SI-7319 Avoid unflushed error/warning buffers in startContext

Which can render a REPL inoperable, or doubly report errors in regular compilation.

I plan to invest some much needed TLC into this area over on master as SI-7345; this PR tries to tread lightly.

Review by the P-s: @hubertp / @paulp