Recursively match braces for route groups, fixes #4630