What wasn't working here? I'd say `name.matchAsPrefix(name)` looks very suspicious. You probably meant `branchRegex.matchAsPrefix(name)`, and that would fix it.