I've made exactly this error, with Stars, Flags and so on. Sometimes I didn't discover the error for many weeks after the error was committed. John Beardsworth helped me out of jam one, and it was not trivial.
Why can we not Lock Image States in Lightroom? If a catalog spans multiple years, or genres of images, is it not logical that one might choose to Lock images, perhaps locking thousands of images at a time, rendering them impervious to unintended key strokes? The more LR offers keystroke shortcuts to do complicated things, as most of us now enjoy, the greater the chance that a few keystrokes could exert united edits on huge numbers of files.
Again, I'm surprised that more people have no insisted on our ability to Lock image states. It goes without saying that one needs also to Unlock, on an as-required basis.
John Caldwell