The org.apache.sling.installer.factory.packages.impl.PackageTransformer#createTask currently returns a ChangeStateTask for resources that it cannot handle . According to the documentation of the org.apache.sling.installer.api.tasks.InstallTaskFactory, a factory should return null "if the factory does not support the resource".
The following error is encountered in the HTL integration tests setup from https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing:
Several tests are failing, since the above bundle doesn't get installed. The error cannot be reproduced all the time, suggesting that the order in which the org.apache.sling.installer.api.tasks.InstallTaskFactory services are started plays a role.
 - https://github.com/apache/sling-org-apache-sling-installer-factory-packages/blob/org.apache.sling.installer.factory.packages-1.0.0/src/main/java/org/apache/sling/installer/factory/packages/impl/PackageTransformer.java#L241