so long story short - unsetting works fine when trying to unset `$this->models[$modelKey]` in first foreach, `$this->models[$modelKey]->equipmentList->equipment[$eqKey]` points to the correct object, but unsetting it in nested foreach doesn't work. Any ideas? Thanks in advance for help.

```
public function processModelsEquipmentList() {
    foreach ($this->models as $modelKey => $model) {
      if (!strstr('#', $model->id)) {
        foreach ($model->equipmentList->equipment as $eqKey => $equipment) {
          if (in_array($equipment->code, $this->specialVersionsCodes)) {
            $newModel = clone $model;   
            $newModel->name.= ' ' . $equipment->name;
            $newModel->id.= '#' . $equipment->id;
            if (strlen($newModel->code) < 4) {
              $newModel->code.=$equipment->code;
            }
            $newModel->order = $newModel->order + 1;
            $newEquipmentList = new EquipmentList($newModel->id, true);
            $newEquipmentList->add(clone $equipment);
            $newModel->setNewEquipmentList($newEquipmentList);
            $this->addModel($newModel);
            //echo $this->models[$modelKey]->equipmentList->equipment[$eqKey]->name;die();
            unset($this->models[$modelKey]->equipmentList->equipment[$eqKey]);
          }
        }
      }
    }
  }

```