Extract code for resolving imports with value names into ModuleResolution