If you have an object that holds a DOMNode, cloning the object won't clone the DOMNode with it. If you simply copy the object or add its DOMNode several times, you will in fact only move the DOMNode in the tree, not multiply it. That might seem obvious, but took me half a day to find out.
The object needs to use __clone and clone the node manually:
<?php
class containsNode {
public $node; //set from somewhere
public function __clone() {
$this->node = $this->node->cloneNode(TRUE);
}
}
?>