Fixing possible memory problems.
Fixing possible memory problems.

Problems were either caused by optimization bug or maybe from
unsafe use of iterators that were unstable over the course of
a call to regexec. I feel like this is an optimization bug.

OwlPlatform/world-model,OwlPlatform/world-model,OwlPlatform/world-model