Make test expansion induce less reachability

We previously reexported entire modules, which caused private things to
become reachable and trip the dead code and private items in public API
lints.

Closes #15912