Don’t cache if compile fails.

Syntax errors would not show up the second time compiling before, just writing undefined to the stream.