Check REQUEST_CONTEXT.context exists before accessing it.

LMS-11226
What if `edxmako.middleware.REQUEST_CONTEXT.context` is `False`, or an empty string or empty list? There's no reason to iterate over it and do the work.