Fixed importing of modules contained in sys.modules.