Remove regex compilation from deep loop.

It has the side effect that if the compilation fails it fails early.