public function restoreTemplateVariables($slotName)
    {
        $templateVariableContainer = $this->renderingContext->getTemplateVariableContainer();
        $mergedArguments = (isset($this->injectedVariables[$slotName])) ? $this->injectedVariables[$slotName] : [];
        $savedArguments = (isset($this->savedVariables[$slotName])) ? $this->savedVariables[$slotName] : [];

        foreach (array_keys($mergedArguments) as $key) {
            $templateVariableContainer->remove($key);
        }

        foreach ($savedArguments as $key => $value) {
            $templateVariableContainer->add($key, $value);
        }
    }