Save module state in the module class instead of the module loader.