Don't recompile the same Pattern continuously
Make generating stack traces slightly more efficient

These still take forever to generate, but hopefully once all
dynjs-specs are passing there won't be so many generated during test
runs.