only set the context the first time in AppKernel

This is needed since the kernel gets serialized and unserialized
during ConfigCache. Shouldn't be needed too long though!