Fix bug in large (multi-packet) flash writes.

--BRJ