Fix issues with new uploader cause by legacy bootloader bugs.

stac's new unified bootloader uses a state machine that works, previous bootloader didn't so there are several bugs which need workarounds on the ground side.