Implements a deep clone.
public function __clone() {
foreach ($this->properties as $name => $property) {
$this->properties[$name] = clone $property;
if ($property instanceof ContextAwareInterface) {
$this->properties[$name]
->setParent($this);
}
}
}