And here you don't check for ScalaPackage. Quite inconsistent