Correct handling of error message contexts.