Avoid probing all versions of the root package when resolving its own sub packages.

This avoids downloading all versions of the root package whenever it contains references to sub packages of itself. See #334.