BUG: Fix `not a in ...` to `a not in ...`.

Also break regular expression compiles out of the loop.