Make flashing more robust to host doing things wrong