package: properly handle tests in the top level

refs #15717