Fix regex scoping.