I sense someone who has been bitten by the recent tendency to put significant amounts of state machine in switchmode controller chips that should have at most a few flipflops and a monostable or so?
State spaces for this sort of thing should be small, and fully covered by recovery logic, but they are all too often these days, large, sparse and NOT covered by recovery logic for illegal states.
I am guessing TI as the offending party, but it could be almost any of 'em.
Something lossy in series, and something capable of clamping in shunt, that's the way you do it, no need to get clever.
Regards, Dan.