[BUGFIX beta] Give precedence to routes with more static segments. Fixes #3573
Merge pull request #3575 from xtian/static-segment-precedence

Give precedence to routes with more static segments. Fixes #3573