### Bug description

I have a quarto website at https://github.com/jamespeapen/journals and I was building locally on Ubuntu 22.04 with quarto `0.9.489` without issues.

The last github workflow used `0.9.629` and failed with a number of errors like this: 

```
ERROR: Project _quarto.yml validation failed.
In file _quarto.yml
(line 21, column 9 through line 23, column 132) Array entry 1 with value part: "Databases"
        chapters: 
          - src/bioinformatics/databases/evaluation_of_relational_and_nosql_database_architectures_to_manage_genomic_annotations.md failed to be a string.
          - 20:       chapters:
          - 21:       - part: "Databases"
          -             ~~~~~~~~~~~~~~~~~
          - 22:         chapters: 
          -     ~~~~~~~~~~~~~~~~~~
          - 23:           - src/bioinformatics/databases/evaluation_of_relational_and_nosql_database_architectures_to_manage_genomic_annotations.md
          -     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          - 24:     - part: "Epigenetics"
          -  The value part: "Databases"
          -         chapters: 
          -           - src/bioinformatics/databases/evaluation_of_relational_and_nosql_database_architectures_to_manage_genomic_annotations.md is object.
          -  The error happened in location book:chapters:1:chapters:0.
```
Doing a bisect, I found that the last working tag was `0.9.497` - the errors started with `0.9.498`.

I am able to reproduce this with this example:

`_quarto.yml`

```yaml
project:
  type: book

book:
  title: "test"
  chapters: 
    - index.qmd
    - part: "one"
      chapters:
        - one.qmd
        - part: "two"
          chapters:
            - two.qmd
```

`index.qmd`, `one.qmd` and `two.qmd` are empty files in the project root.
Running `quarto render --to html` with `0.9.497` runs without error. With `0.9.498` I get:


```
ERROR: Project _quarto.yml validation failed.

In file _quarto.yml
(line 11, column 11 through line 13, column 21) Array entry 2 with value part: "two"
          chapters:
            - two.qmd failed to be a string.
            - 10:         - one.qmd
            - 11:         - part: "two"
            -               ~~~~~~~~~~~
            - 12:           chapters:
            -     ~~~~~~~~~~~~~~~~~~~
            - 13:             - two.qmd
            -     ~~~~~~~~~~~~~~~~~~~~
            -  The value part: "two"
            -           chapters:
            -             - two.qmd is object.
            -  The error happened in location book:chapters:1:chapters:1.
```

It renders only if part "two" is moved from subchapter to chapter:

```yaml
project:
  type: book

book:
  title: "test"
  chapters: 
    - index.qmd
    - part: "one"
      chapters:
        - one.qmd
    - part: "two"
      chapters:
        - two.qmd
```

Thanks!

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, self-contained, and reproducible example?
- [X] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?
- [ ] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
cscheid
2022-06-29T15:45:10Z
jamespeapen
bug invalid
1.0
closed
YAML validation failing with 0.9.498 for sub-chapters
https://github.com/quarto-dev/quarto-cli/issues/1245