public function remove($name)
    {
        if (!isset($this->indexed[$name])) {
            return;
        }
        unset($this->indexed[$name]);

        foreach ($this->items as $i => $v) {
            if ($v === $name) {
                unset($this->items[$i]);
            }
        }
    }