protected function updateGroupStack(array $attributes): void
    {
        if ($this->hasGroupStack()) {
            $attributes = RouteGroup::merge($attributes, \end($this->groupStack));
        }

        $this->groupStack[] = $attributes;
    }