Fix problem when accessing same identifier from nested packages.
Fix problem when accessing same identifier from nested packages.

The previous rules picked the once outer removed member rather than
the innermost one, of both members exist.

Seen in the wild in scala.sys.ShutdownHookThread. No separate test here,
because we'll include large parts of stdlib anyway as a build test.

lampepfl/dotty,lampepfl/dotty,lampepfl/dotty,lampepfl/dotty,reactormonk/dotty,reactormonk/dotty,som-snytt/dotty,sjrd/dotty,som-snytt/dotty,dotty-staging/dotty,som-snytt/dotty,dotty-staging/dotty,som-snytt/dotty,sjrd/dotty,sjrd/dotty,dotty-staging/dotty,densh/dotty,sjrd/dotty,densh/dotty,sjrd/dotty,dotty-staging/dotty,som-snytt/dotty,lampepfl/dotty,dotty-staging/dotty