Remove duplicate calls to encode/decode.