anchor.diff:         is_tuple(Msg) ->
       local(Msg, TPid, DictT, Fs, ReqPkt#diameter_packet{errors = []});
   
  -local(Msg, TPid, {MsgDict, AppDict, Dict0} = DictT, Fs, ReqPkt) ->
  +local(Msg, TPid, {MsgDict, AppDict, Dict0}, Fs, ReqPkt) ->
       Pkt = encode({MsgDict, AppDict},
                    TPid,
                    reset(make_answer_packet(Msg, ReqPkt), MsgDict, Dict0),
                    Fs),
  -    incr(send, Pkt, TPid, AppDict),
  -    incr_rc(send, Pkt, TPid, DictT),  %% count outgoing
  -    Pkt.
  +    {MsgDict, Pkt}.
   
   %% reset/3
   
  
positive.code:     local(Ans, TPid, {MsgDict, AppDict, Dict0}, Fs, ReqPkt);
  
  %% ... or relayed.
  reply(#diameter_packet{} = Pkt, _TPid, _DictT, Fs, _ReqPkt) ->
      eval_packet(Pkt, Fs),
      Pkt.
  
  %% local/5
  %%
  
negative.code: %% Increment a stats counter for result codes in incoming and outgoing
  %% answers.
  
  %% Message sent as a header/avps list.
  incr_result(send = Dir,
              #diameter_packet{msg = [#diameter_header{} = H | _]}
              = Pkt,
              TPid,
              DictT) ->
      incr_res(Dir, Pkt#diameter_packet{header = H}, TPid, DictT);
  
  %% Outgoing message as binary: don't count. (Sending binaries is only
  %% partially supported.)
  incr_result(send, #diameter_packet{header = undefined = No}, _, _) ->
      No;
  
  %% Incoming or outgoing. Outgoing with encode errors never gets here
  %% since encode fails.
  incr_result(Dir, Pkt, TPid, DictT) ->
      incr_res(Dir, Pkt, TPid, DictT).
  
  incr_res(Dir,
           #diameter_packet{header = #diameter_header{is_error = E}
                            = Hdr,
                            errors = Es}
           = Pkt,
           TPid,
           DictT) ->
      {MsgDict, AppDict, Dict0} = DictT,
  
      Id = msg_id(Hdr, AppDict),
      %% Could be {relay, 0}, in which case the R-bit is redundant since
  