The R-URI is the next hop address like in the first Route header, which indicates that your config might do wrong NAT traversal processing, like using fix_nated_contact(), when the proxy is not the first hop after the NAT router.
There is no indication of a bug in the c code, therefore I suggest to discuss about your config and this behaviour on sr-users@lists.kamailio.org mailing list. Once it is sorted out what happens and if proves to be a C code problem, an issue can be created with the clear details of the bug.