For one think we shouldn't use `Tree#foreach`, and rather use a custom `Traverser` that doesn't descend into `ClassDef` / `ModuleDef`. That's what `openPackageObjectsTraverser` does.

We'll need this info on every compile run (every time we open a package we look for the corresponding package class), so it seems to me that we should just move the `packageobjects` before `namer`, rather then calling it during `namer` and caching the results. But there are no doubt complications. /cc @lrytz