Fixes bug where a module is required while it is in process of resolving