private function fixUniqueHeaders()
    {
        $headers = $this->getHeaders();
        $headersCopy = clone $headers;
        $headers->clearHeaders();
        foreach ($headersCopy as $header) {
            $name = $header->getFieldName();
            $headers->has($name) or $headers->addHeader($header);
        }
    }