Properly take into account the dialplan priority in case entry matches both string and regex rules
(cherry picked from commit 0625610376acbc29f5a9f6a7a79ec897ebfe53fa)