Improve some error messages when processing context.