We could end up overflowing if we print out something that's a multiple of the chunk size, which would then finish printing in the chunk-printing, but not break out early. (cherry picked from commit 6325b3662de122b571e33b7121cfc9d172d483bc)