Speed up the code a little, and stop swapping stream buffers around in case that's the cause of some test failures.