Make the ConfigManager.hasBeenInitialized() checks happen earlier in contextInitialized() and contextDestroyed().