Do you always push the code to the device without testing the code in debug mode?
I would recommend to debug (you do not need to set breakpoints) all code first just to verify it, and if the code "brick" the device, just reboot it and it's back to normal.
I have to agree, but nevertheless a bug executed within a vm – according to the architeture chapter 3 of the mc-Script manual – shouldn't brick the whole module. Period.