anchor.diff:               %% undefined is already handled, we have a match,
                %% the field occurs, as if it had been required
                OField2 = OField#?gpb_field{occurrence=required},
  +             Tr2 = Tr({update_elem_path,Name}),
                EncExpr = field_encode_expr(MsgName, MsgVar, OField2, OFVar,
  -                                         PrevBVar, Defs, AnRes, Opts,
  +                                         PrevBVar, Defs, Tr2, AnRes, Opts,
                                            no_typedefault_checking),
                [replace_tree('<oneof...>', MatchPattern),
                 replace_tree('<expr>', EncExpr)]
  
positive.code:      gpb_codegen:format_fn(
         PackedFnName,
         fun([Value | Rest], Bin) ->
                 Bin2 = '<encode-elem>'(Value, Bin),
                 call_self(Rest, Bin2);
            ([], Bin) ->
                 Bin
         end,
         [replace_term('<encode-elem>', ElemEncoderFn)])].
  
  format_type_encoders(AnRes) ->
      [format_varlength_field_encoders(AnRes),
  
negative.code:     {EncodeExprs, _} =
          lists:mapfoldl(
            fun({NewBVar, Field, FVar}, PrevBVar) when NewBVar /= last ->
                    Tr = mk_find_tr_fn(MsgName, Field, AnRes),
                    EncExpr = field_encode_expr(MsgName, MsgVar, Field, FVar,
                                                PrevBVar, Defs, Tr, AnRes, Opts,
                                                p3_check_typedefaults),
                    E = ?expr('<NewB>' = '<encode-expr>',
                              [replace_tree('<NewB>', NewBVar),
                               replace_tree('<encode-expr>', EncExpr)]),
                    {E, NewBVar};
               ({last, Field, FVar}, PrevBVar) ->
                    Tr = mk_find_tr_fn(MsgName, Field, AnRes),
                    EncExpr = field_encode_expr(MsgName, MsgVar, Field, FVar,
                                                PrevBVar, Defs, Tr, AnRes, Opts,
                                                p3_check_typedefaults),
                    {EncExpr, dummy}
            end,
  