boolean (PackageSet currentScope) { if (currentScope instanceof InvalidPackageSet) return true; if (currentScope instanceof CompoundPackageSet) { return ContainerUtil.or(((CompoundPackageSet)currentScope).getSets(), s->invalidScopeInside(s)); } if (currentScope instanceof ComplementPackageSet) { return invalidScopeInside(((ComplementPackageSet)currentScope).getComplementarySet()); } return false; }