[Regression] Fix matching on non-TCP transport ports

Re-apply patch from 9f96fc4 that was reverted in e69931c.