anchor.diff:      diameter_gen_acct_rfc6733.
   
   %% Set only values that aren't already.
  +
   set(_, [H|T], Vs) ->
       [H | Vs ++ T];
  +
  +set(_, Map, Vs)
  +  when is_map(Map) ->
  +    maps:merge(maps:from_list(Vs), Map);
  +
   set(#group{client_dict = Dict0} = _Group, Rec, Vs) ->
       Dict = dict(Rec, Dict0),
       lists:foldl(fun({F,_} = FV, A) ->
  -                        set(Dict, Dict:'#get-'(F, A), FV, A)
  +                        reset(Dict, Dict:'#get-'(F, A), FV, A)
                   end,
                   Rec,
                   Vs).
   
  -set(Dict, E, FV, Rec)
  +reset(Dict, E, FV, Rec)
     when E == undefined;
          E == [] ->
       Dict:'#set-'(FV, Rec);
  -set(_, _, _, Rec) ->
  +
  +reset(_, _, _, Rec) ->
       Rec.
   
   %% ===========================================================================
  
positive.code: dict0(D) ->
      ?A("diameter_gen_base_" ++ ?L(D)).
  
  dict(Msg, nas4005 = D) ->
      if 'answer-message' == hd(Msg);
         ?is_record(Msg, 'diameter_base_answer-message') ->
              diameter_gen_base_rfc3588;
         true ->
              D
      end;
  dict(Msg, Dict0)
    when 'ACR' == hd(Msg);
         'ACA' == hd(Msg);
         ?is_record(Msg, diameter_base_accounting_ACR);
         ?is_record(Msg, diameter_base_accounting_ACA) ->
      acct(Dict0);
  dict(_, Dict0) ->
      Dict0.
  
  acct(diameter_gen_base_rfc3588) ->
  
negative.code: 
  %% prepare/3
  
  prepare(#diameter_packet{msg = Req} = Pkt, Caps, Group) ->
      set(name(Req), Pkt, Caps, Group).
  
  %% set/4
  
  set(N, #diameter_packet{msg = Req}, Caps, Group)
    when N == {record, diameter_base_accounting_ACR};
         N == {record, nas_ACR};
         N == {map, 'ACR'};
         N == {list, 'ACR'} ->
      #diameter_caps{origin_host  = {OH, _},
                     origin_realm = {OR, DR}}
          = Caps,
  