Error if encode_inner and encode_final