anchor.diff:  
   %% avp_decode/3
   
  -avp_decode(Dict, Name, #diameter_avp{value = undefined,
  +%% Ensure Experimental-Result is decoded as record, since this format
  +%% is used for counter keys.
  +avp_decode(Dict, 'Experimental-Result' = N, #diameter_avp{data = Bin}
  +                                            = Avp)
  +  when is_binary(Bin) ->
  +    {V,_} = Dict:avp(decode, Bin, N, decode_opts(Dict)),
  +    Avp#diameter_avp{name = N, value = V};
  +
  +avp_decode(Dict, Name, #diameter_avp{value = X,
                                        data = Bin}
                          = Avp)
  -  when is_binary(Bin) ->
  +  when is_binary(Bin), X == undefined orelse X == false ->
       V = Dict:avp(decode, Bin, Name, decode_opts(Dict)),
  -    Avp#diameter_avp{value = V};
  -avp_decode(_, _, #diameter_avp{} = Avp) ->
  -    Avp.
  +    Avp#diameter_avp{name = Name, value = V};
  +
  +avp_decode(_, Name, #diameter_avp{} = Avp) ->
  +    Avp#diameter_avp{name = Name}.
  +
  +%% cb/3
   
   cb(#diameter_app{module = [_|_] = M}, F, A) ->
       eval(M, F, A).
  
positive.code: get_avp(_, Name, [_MsgName | Avps]) ->
      case find(Name, Avps) of
          {_, V} ->
              #diameter_avp{name = Name, value = V};
          _ ->
              undefined
      end;
  
  %% ... or record (but not necessarily).
  get_avp(Dict, Name, Rec) ->
      try
          #diameter_avp{name = Name, value = Dict:'#get-'(Name, Rec)}
      catch
          error:_ ->
              undefined
      end.
  
  %% find/2
  
  
negative.code: get_avp(?RELAY, Name, Msg) ->
      get_avp(?BASE, Name, Msg);
  
  %% Message as header/avps list.
  get_avp(Dict, Name, [#diameter_header{} | Avps]) ->
      try
          {Code, _, Vid} = Dict:avp_header(Name),
          A = find_avp(Code, Vid, Avps),
          avp_decode(Dict, Name, ungroup(A))
      catch
          error: _ ->
              undefined
  