anchor.diff:      %% interesting thing is the replacement.
       This = srvlookup(Proto, H#naptrrecord.replacement),
       Sorted = lists:sort(fun sortsrv/2, This),
  -    naptr_to_srvlist2(Rest, lists:flatten([Res, Sorted])).
  +    naptr_to_srvlist2(T, lists:flatten([Res, Sorted]));
  +%%
  +%% Non-empty regexp, not a domain NAPTR
  +%%
  +naptr_to_srvlist2([H | T], Res) when is_record(H, naptrrecord) ->
  +    naptr_to_srvlist2(T, Res);
  +naptr_to_srvlist2([], Res) ->
  +    Res.
   
   %%--------------------------------------------------------------------
   %% Function: debugfriendly_srventry(In)
  
positive.code: %% Descrip.: Walk through a list of srventry records or {error, R}
  %%           tuples and turn the srventry records into
  %%           {Proto, Host, Port} tuples.
  %% Returns : ProtoHostPortList
  %%           ProtoHostPortList = list() of {Proto, Host, Port}
  %%           Proto = tcp | udp | tls
  %%           Host  = string()
  %%           Port  = integer()
  %%--------------------------------------------------------------------
  combine_srvresults(In) ->
      combine_srvresults(In, [], []).
  
  combine_srvresults([], [], Errors) ->
      Errors;
  combine_srvresults([], Res, _) ->
      Res;
  combine_srvresults([{error, What} | T], Res, Errors) ->
      combine_srvresults(T, Res, lists:append(Errors, [{error, What}]));
  combine_srvresults([H | T], Res, Errors) when is_record(H, srventry) ->
      {_Order, _Weight, Port, Host} = H#srventry.dnsrrdata,
      combine_srvresults(T, lists:append(Res, [{H#srventry.proto, Host, Port}]), Errors).
  
  
  %%--------------------------------------------------------------------
  
negative.code: naptr_to_srvlist(In) ->
      naptr_to_srvlist2(In, []).
  
  %%
  %% Empty regexp
  %%
  naptr_to_srvlist2([#naptrrecord{regexp=""}=H | T], Res) ->
      Proto = case H#naptrrecord.services of
  		"SIP+D2U"  ++ _ -> udp;
  		"SIP+D2T"  ++ _ -> tcp;
  