@henningw As requested: https://www.kamailio.org/wiki/cookbooks/devel/core?do=diff&rev2%5B0%5D=1...
With regards to the border condition that you mention, I don't believe there should be such a case, unless weird things are done in the `goto error;` branch. I understand your concern, however.
I will let you know when we've deployed this in production.