anchor.diff:         _Caps,
          _RecvData,
          #diameter_packet{errors = [RC|_]})  %% a detected 3xxx is hd
  -  when E == answer, (Dict0 /= ?BASE orelse 3 == RC div 1000);
  +  when E == answer, Dict0 /= ?BASE orelse 3 == RC div 1000;
          E == answer_3xxx, 3 == RC div 1000 ->
  -    {{answer_message, rc(RC)}, [], []};
  +    [{answer_message, rc(RC)}, []];
   
   %% ... or make a handle_request callback. Note that
   %% Pkt#diameter_packet.msg = undefined in the 3001 case.
  
positive.code:                        apps = Apps}
               = RecvData) ->
      Ack andalso (TPid ! {handler, self()}),
      send_A(recv_R(diameter_service:find_incoming_app(PeerT, TPid, Id, Apps),
                    TPid,
                    Pkt,
                    Dict0,
                    RecvData),
             TPid,
             Dict0,
             RecvData).
  
  %% recv_R/5
  
  recv_R({#diameter_app{id = Id, dictionary = AppDict} = App, Caps},
         TPid,
         Pkt0,
         Dict0,
         #recvdata{codec = Opts}
         = RecvData) ->
      incr(recv, Pkt0, TPid, AppDict),
      Pkt = errors(Id, diameter_codec:decode(Id, AppDict, Opts, Pkt0)),
      incr_error(recv, Pkt, TPid, AppDict),
      {Caps, Pkt, App, recv_R(App, TPid, Dict0, Caps, RecvData, Pkt)};
  %% Note that the decode is different depending on whether or not Id is
  %% ?APP_ID_RELAY.
  
  %%   DIAMETER_APPLICATION_UNSUPPORTED   3007
  %%      A request was sent for an application that is not supported.
  
  recv_R(#diameter_caps{}
         = Caps,
         _TPid,
         #diameter_packet{errors = Es}
         = Pkt,
         _Dict0,
         _RecvData) ->
      {Caps, Pkt#diameter_packet{avps = collect_avps(Pkt),
                                 errors = [3007 | Es]}};
  
  recv_R(false = No, _, _, _, _) ->  %% transport has gone down
      No.
  
  collect_avps(Pkt) ->
      case diameter_codec:collect_avps(Pkt) of
  
negative.code:     Seq = diameter_session:sequence(Mask),
      Hdr = Hdr0#diameter_header{hop_by_hop_id = Seq},
      Msg = [Hdr, Route | Avps],  %% reordered at encode
      case send_request(SvcName, App, Msg, Opts) of
          #diameter_packet{} = Ans ->
              Ans;
          _ ->
              3002  %% DIAMETER_UNABLE_TO_DELIVER.
      end.
  %% The incoming request is relayed with the addition of a
  %% Route-Record. Note the requirement on the return from call/4 below,
  %% which places a requirement on the value returned by the
  