Second batch of parser optimizations
Not nearly as much gain as the last round, just a few percent here and there this time.
See individual commits for details (the qsizetype change isn't performance related, that's just correctness fixes noticed along the way, and there's probably more of that to do).