Basically, you have to hang around long enough for the flash update to complete before issuing the reboot. The simplest way to ensure that this happens correctly regardless of client, is to read back the kernel after writing it. Readback only takes about a second or so. And while you're at it, you might as well compare the readback with the file that was written.

Cheers