Fix bug with nested imports.