Setting `number-sections:true` with pdf as output format breaks the output.

For example:
```
---
title: "My document"
format:
  pdf:
    toc: true
    number-sections: false
---

# Beginning

# Middle

# End
```

The example above works as expected, but as soon as `number-sections` is set to `true`, the created PDF has "End" as Title, and only a single headline with "Table of contents" as content. I tried out several of the previous versions, none of them produced the expected outcome. 

With `number-sections:true`, I checked with `keep-tex: true` the `.tex`-file, which had the following as document body:
```
\begin{document}
\maketitle
\ifdefined\Shaded\renewenvironment{Shaded}{\begin{tcolorbox}[boxrule=0pt, frame hidden, sharp corners, interior hidden, borderline west={3pt}{0pt}{shadecolor}, enhanced, breakable]}{\end{tcolorbox}}\fi

\renewcommand*\contentsname{Table of contents}
{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{3}
\tableofcontents
}




\end{document}
```

I guess this is a bug in quarto?
dragonstyle
2022-05-23T18:30:14Z
sknauff
closed
`number-sections:true` breaks pdf output
https://github.com/quarto-dev/quarto-cli/issues/956