Test and fix for dealing with path regexes with multiple subexpressions