Don't use shorthand match on routes with inappropriate symbols

Fixes exception from #18211
Test in this pull-request shows an example.
Yes, and sometimes the tests don't cover everything so I'd prefer to not change the match if possible