Rewriting CompileExpression message generation logic