We had assumed that WriteFile/OVERLAPPED operations didn't modify the
file cursor. This was wrong. We emulate the POSIX behaviour using a few
explicit seek calls.
This introduces an incorrect transient state, but isn't a huge problem
for our use cases.