One potential solution would be to rework this based on the
TrackingMutableAttachments that I added for management purposes
(so you could see which deployers were creating attachments).
It would need extending to include who referenced the predetermined attachments
and you've still got the issues of trying to workout the ClassLoadingMetaData
is only a default rule and letting plain jar files through that just create classloaders.
But its probably a lot less error prone than the isDeployed() handling
with the deployed() invocations that is currently broken now.