protected function removeElementFromBuffer($key)
    {
        $result = array_search($key, $this->bufferKeys);
        if ($result === false) {
            return;
        }

        unset($this->buffer[$key]);
        unset($this->bufferKeys[$result]);
    }