Is this check really needed ? It's already taken care in the BaseSubPathMatcher.