=htc #16388 fix StackOverflowException during chunk parsing

Because of the test changes it may collide with other PRs.

Fixes #16388.

/cc @sirthias 
+1