GROOVY-6456: AbstractHttpServlet.applyResourceNameMatcher race condition

converted Patch supplied by Andrej Fink to pull request