This is a very bizarre bug, but it is definitely related to theme('anything') getting called during hook_init (or more generally, no contexts can be set /after/ theme() is called). The reason for this is that if context_active_contexts() is called before a context has been set, then the static variables in play prevent context_set() from ever overriding the static $contexts variable.

Comments

jhedstrom’s picture

Status: Active » Closed (works as designed)

I tracked this down to an errant call in a template.php file to context_active_contexts, so this is not an issue with context itself.