Check REQUEST_CONTEXT.context exists before accessing it.

LMS-11226
or could we patch it like
```
context_copy = edxmako.middleware.REQUEST_CONTEXT.copy()
if hasattr(context_copy, "context"):
    del context_copy.context
with patch.dict(edxmako.middleware.REQUEST_CONTEXT, context_copy):
    self.assertIn("this module is temporarily unavailable", render_to_string("courseware/error-message.html", None))
```