Prior to this commit, the `AntPathMatcher` would inconsistently match pattern with trailing slashes if they contain `"**"` within their pattern. For example `"/en/test/"` would match `"/**/test"`, but it would not match `"/*/test"` (as it should). This commit fixes this behavior for better consistency. Fixes gh-27506