Enable ctRegex tests, fix 3 latent bugs

The bulk of changes is unindention of a block of tests that is no longer versioned out.

This caught quite a few bugs. 'Out of memory' still won't allow running all tests. But at least now ctRegex can be considered half-tested (~150/265).