Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case""
Specifically, this reverts commit b20bce8ce54ea9d47c2e3eb0b17cbb6baf916ae2 from #77421 to fix#77586.
The lang team has decided that for the time being we want to avoid the breakage here (perhaps for a future edition; though almost certainly not the upcoming one), though a future PR may want to add a lint around this case (and perhaps others) which are unlikely to be readable code.
r? `@petrochenkov` to confirm this is the right way to fix#77586.