Hi Derek,
The firmware must be updated, otherwise the software would not run, I mean on each runs the firmware version and CRC error check codes are readout and if any of them not matching then the software tries to update the firmware, if it can't or if the firmware update fails with even one bit of difference then the software would not run but would start a firmware update again and again until the firmware is updated properly. The bootloader is what takes care of this process and that works properly, have never had any problem with it. That part of the software was built very robust, because if that would not work properly would be a catastrophe.
Because I ran your code several times now and was observing the happenings and do not see anything I would like to ask you that if you will have some time then please try to run the code again with version 1.2037 and please observe the problem again and give me the code which sure causes it. Then I will make further testruns on it and hopefully will become more smart about what is going on.