anchor.diff:  is_msg_type({msg,_}) -> true;
   is_msg_type(_)       -> false.
   
  -format_field_encoder(MsgName, #field{occurrence=Occurrence}=FieldDef) ->
  +format_field_encoder(MsgName, #field{occurrence=Occurrence}=FieldDef, Defs) ->
       [possibly_format_mfield_encoder(MsgName,
  -                                    FieldDef#field{occurrence=required}),
  +                                    FieldDef#field{occurrence=required},
  +                                    Defs),
        case {Occurrence, is_packed(FieldDef)} of
            {repeated, false} -> format_repeated_field_encoder2(MsgName, FieldDef);
            {repeated, true}  -> format_packed_field_encoder2(MsgName, FieldDef);
  
positive.code:     FieldMatchings = string:join([f("~p=F~s", [FName, FName])
                                    || #field{name=FName} <- MsgDef],
                                   MatchCommaSep),
      [f("~p(#~p{~s}) ->~n", [FnName, MsgName, FieldMatchings]),
       f("    Bin0 = <<>>,\n"),
       string:join(
         [begin
              FieldEncoderFn = mk_field_encode_fn_name(MsgName, Field),
  
negative.code:     mk_fn(e_type_, Type).
  
  format_special_field_encoders(Defs) ->
      [[format_field_encoder(MsgName, FieldDef, Defs)
        || #field{occurrence=Occ, type=Type}=FieldDef <- MsgDef,
           Occ == repeated orelse is_msg_type(Type)]
       || {{msg,MsgName}, MsgDef} <- Defs].
  