Anticipating that such scenarios are inevitable, a certain amount of warning/advice to students _in_advance_ is helpful. But don't go overboard, or you may generate paranoia about flawed questions.
Especially in upper-division or graduate classes, encouraging critical/skeptical thinking as a matter of course is a good thing.
Trying to "correct" an exam part-way through may be the worst reaction, insofar as some students may have already wasted time. Thus, either throwing the question out or giving everyone full credit is not "fair". After seeing some debacles of this sort on PhD qualifying exams, it finally dawned on me that declaring the exam to simply be whatever it is, possibly with some flaws, rather than trying to repair it during the exam itself, is saner than any compensation scheme.
(Some ways of dodging the issue of flawed exams strike me as adversarial-to-students, e.g., the "prove or disprove" gambit, wherein implied context or forgotten minor hypotheses are "gotchas" potentially unrelated to the mathematics itself. Or use/mis-use of English articles "a, an, the" and modifiers "all, any, every"...)
In summary, I refuse to discuss exams during the exam, so would not overtly admit a flaw in any particular problem... because someone may have already wasted time on it, while others haven't. If an exam is so flawed that it grossly fails to serve its design purpose, probably throwing it out entirely and doing a new exam is the only reasonable course. Even then, some students will have been stressed by the thrown-out exam...