Multiple attach points?

Trying to make custom ammunition types for the firearms, I ran into the very obvious problem that the game makes no separation between ammo types and attachments. It’s all “custom data”, and it’s applied to an item, so there doesn’t appear to be a way to stack it.
Does anyone know of a workaround for this? Other than creating separate items for weapon with/without attachment, as that would remove the ability to detach them.
EDIT: For that matter, does anyone know how to make crafted items inherit the quality of other items?