This prevents the bug in the previous change, but avoids an extraneous
seek() call in the common case when it's not required. My preference
was to ban .seek() and .tell() entirely on append-mode files since
they're potentially misleading, but our codebase doesn't make that
easy. This is better than nothing.
See the previous change for a detailed explanation of the bug we've
observed in the wild.