Fail if trying to generate an injector in an invalid package.