PHP magic __clone() method.
Only copies fields that implement Drupal\Core\Database\Query\ConditionInterface. Also sets $this->changed to TRUE.
function __clone() {
$this->changed = TRUE;
foreach ($this->conditions as $key => $condition) {
if ($key !== '#conjunction' && $condition['field'] instanceof ConditionInterface) {
$this->conditions[$key]['field'] = clone $condition['field'];
}
}
}