Make is_pseudo_package work on JVM.

Fixes S02-names/indirect.t, possibly more.