anchor.diff:  %%      Failed-AVP AVP MUST be included and contain a copy of the
   %%      offending AVP.
   
  -%% pack_arity/4
  +%% pack_AVP/4
   
   %% Give Failed-AVP special treatment since (1) it'll contain any
   %% unrecognized mandatory AVP's and (2) the RFC 3588 grammar failed to
   %% allow for Failed-AVP in an answer-message.
   
  -pack_arity(Name,
  -           #{strict_mbit := Strict,
  -             failed_avp := Failed},
  -           Mod,
  -           #diameter_avp{is_mandatory = M,
  -                         name = AvpName}) ->
  +pack_AVP(Name,
  +         #{strict_mbit := Strict,
  +           failed_avp := Failed},
  +         Arity,
  +         #diameter_avp{is_mandatory = M,
  +                       name = AvpName}) ->
   
       %% Not testing just Name /= 'Failed-AVP' means we're changing the
       %% packing of AVPs nested within Failed-AVP, but the point of
  
positive.code: mapfoldl(_, Acc, [], List) ->
      {List, Acc}.
  
  %% missing/4
  
  %% 3588:
  %%
  %%   DIAMETER_MISSING_AVP               5005
  %%      The request did not contain an AVP that is required by the Command
  
negative.code:         = mapfoldl(fun(T,A) -> decode(Name, Opts, Mod, T, A) end,
                     {newrec(Mod, Name, Fmt), #{}, []},
                     Recs),
      %% AM counts the number of top-level AVPs, which arities/5 then
      %% uses when adding 500[59] errors.
      Arities = Mod:avp_arity(Name),
      {reformat(Name, Rec, Arities, Mod, Fmt),
       Avps,
       Failed ++ arities(Arities, Opts, Mod, AM, Avps)}.
  
  %% Append arity errors so that errors are reported in the order
  %% encountered. Failed-AVP should typically contain the first
  %% error encountered.
  
  