Remove usage of internal header encoding API.