Running `wat2wasm` on a rather big file with many nested if-statements segfaults.

Version: wabt 1.0.32-1 (debian bookworm)
System: Debian (with enough RAM + swap)

Steps to reproduce:
```
wasm2wat CertiCoq.Benchmarks.tests.color.wasm > color.wat          // color.wat is ~20GB
wat2wasm color.wat -o color.wam                                    // Segmention fault
wasm-tools parse color.wat -o color.wasm                           // works
```

segfault:
```
(gdb) run
Starting program: /home/wolfgang/ProjectsUni/Compilerstep/wabt/out/clang/Debug/wat2wasm color.wat -o color.wasm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00005555555f3db3 in wabt::WastParser::GetToken (this=0x7fffffffd800)
    at /home/wolfgang/ProjectsUni/Compilerstep/wabt/src/wast-parser.cc:585
585       if (tokens_.empty()) {
(gdb)
```


[CertiCoq.Benchmarks.tests.color.zip](https://github.com/WebAssembly/wabt/files/14104533/CertiCoq.Benchmarks.tests.color.zip)

wat2wasm segfaults on .wat file with many nested if statements
This is a GitHub Issue
repo:wabt
owner:WebAssembly
Title : wat2wasm segfaults on .wat file with many nested if statements
Issue date:

--- start body ---
Running `wat2wasm` on a rather big file with many nested if-statements segfaults.

Version: wabt 1.0.32-1 (debian bookworm)
System: Debian (with enough RAM + swap)

Steps to reproduce:
```
wasm2wat CertiCoq.Benchmarks.tests.color.wasm > color.wat          // color.wat is ~20GB
wat2wasm color.wat -o color.wam                                    // Segmention fault
wasm-tools parse color.wat -o color.wasm                           // works
```

segfault:
```
(gdb) run
Starting program: /home/wolfgang/ProjectsUni/Compilerstep/wabt/out/clang/Debug/wat2wasm color.wat -o color.wasm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00005555555f3db3 in wabt::WastParser::GetToken (this=0x7fffffffd800)
    at /home/wolfgang/ProjectsUni/Compilerstep/wabt/src/wast-parser.cc:585
585       if (tokens_.empty()) {
(gdb)
```


[CertiCoq.Benchmarks.tests.color.zip](https://github.com/WebAssembly/wabt/files/14104533/CertiCoq.Benchmarks.tests.color.zip)

--- end body ---
