protected function _removeNode($id, $index) {
        $pk = $this->getRepository()->getPrimaryKey();

        foreach ([$this->getConfig('leftField'), $this->getConfig('rightField')] as $field) {
            $this->_moveNode(function(Query $query) use ($field, $index, $id, $pk) {
                $query->where($field, '>=', $index);

                if ($id) {
                    $query->where($pk, '!=', $id);
                }
            }, [
                $field => Query::expr($field, '-', 2)
            ]);
        }
    }