Fix nested imports to allow completion only for modules