There's a bug in the management of partial templates and replicas because replicas are generated for every target object which is then replaced by them, at the second apply when there are multiple targets, replicas are generate for every target thus resulting in a multiplication of instances.
Needs in depth analysis...