Good it was found -- I was just looking the code and the same function is used in both cases.
I am not sure what kind of error can be thrown in case of such config mistake. If you have suggestions, open a discussion on sr-users@lists.kamailio.org mailing list so other can comment.