It can happen that frontend emits error message when releasing the builder. When that happens, we emit the error message and continue to invoke backend.
Backend will then crash.
The fix is quite simple, we check for errors after releasing the builder.
Is it possible to avoid the code duplication if the condition is inverted as shown below?
if (!Diags.hasErrorOccurred())
if (!Diags.hasErrorOccurred())
// Clear Builder and reset M