Why would a bug like that not lead to an instant communication to halt all use of the devices until a patch could be distributed ?
Good thing the couch wasn't driven by a worm-wheel or there would have been no way to pull that person out.
An emergency switch should be independent of software anyway, that's the norm in machining tools, the 'e-stop' circuitry has to be set up according to very specific rules to be approved, you'd expect more stringent controls on hospital equipment.