I first learned of this incident in the early 2000s from a computer book about how to code UML State charts in C/C++ [1]. It included a CD-ROM with a library that implemented a rather clever way of maintaining state using the call stack.
Unfortunately, the naive software fix for the Therac-25 is to add a flag (which is additional state) to the system which is to add complexity to the system.