Avoid filling up AntPathMatcher cache

This change avoid use of AntPathMatcher to extract URI template
variables when the lookup path is used as the best matching pattern.

Issue: SPR-10803