Handle conflicting import of items declared in the same module

Fixes #19498
@nick29581 :  I assume you are talking about cases like this (the below one is a simple loop, while we can have arbitrary length cycles)  
```
mod A {
   pub use B::submodule;  // error: unresolved import B::submodule;
}

mod B {
   pub use A::submodule; // error: unresolved import A::submodule;
}

fn main() {
}
```

In such cases, the fixed point algorithm will terminate because no progress will be made in resolving any of the import directive, and an error will be printed for each import.