Debugging parsing errors can be greatly improved if we know what the parser state was and what the buffer flags were (especially for closed inputs/outputs and full buffers). Let's add that to the error snapshots.