You should be 100% sure that such code never ever gets executed by legitimate user. As seen above, it doesn't have to be a bug in licensing code, it could be something external.
Yup. Long ago, join an online Command and Conquer game. Boom, everything blows up. Piracy watchdog that reacted to my repairing Windows and not realizing I needed to reinstall the game after that.