anchor.diff:          orelse (E andalso PE)
           orelse x({invalid_error_bit, RC}, answer, [Dir, Pkt]),
   
  -    incr(TPid, Hdr, Dir, rc_counter(Rec, RC)).
  -
  -%% incr/4
  -
  -incr(TPid, Hdr, Dir, Ctr)
  -  when is_tuple(Ctr) ->
  -    incr(TPid, {diameter_codec:msg_id(Hdr), Dir, Ctr});
  -
  -incr(_, _, _, _) ->
  -    false.
  +    irc(TPid, Hdr, Dir, rc_counter(Dict, Rec, RC)).
  +
  +irc(_, _, _, undefined) ->
  +    false;
  +
  +irc(TPid, Hdr, Dir, Ctr) ->
  +    incr(TPid, {diameter_codec:msg_id(Hdr), Dir, Ctr}).
   
   %% incr/2
   
  
positive.code: %% Maintain statistics assuming one or the other, not both, which is
  %% surely the intent of the RFC.
  
  rc_counter(_, RC)
    when is_integer(RC) ->
      {'Result-Code', RC};
  rc_counter(Rec, _) ->
      rcc(get_avp_value(?BASE, 'Experimental-Result', Rec)).
  
  %% Outgoing answers may be in any of the forms messages can be sent
  %% in. Incoming messages will be records. We're assuming here that the
  %% arity of the result code AVP's is 0 or 1.
  
  rcc([{_,_,RC} = T])
    when is_integer(RC) ->
      T;
  rcc({_,_,RC} = T)
    when is_integer(RC) ->
      T;
  rcc(_) ->
      undefined.
  
  int([N])
    when is_integer(N) ->
      N;
  int(N)
  
negative.code: %% just resend with a new hop by hop identifier, but might a proxy
  %% want to examine the answer?
  
  answer(Pkt, SvcName, AE, #request{transport = TPid,
                                    dictionary = Dict}
                           = Req) ->
      try
          incr(recv, Pkt, Dict, TPid)
      of
          _ -> a(Pkt, SvcName, AE, Req)
      catch
  