Flaws in Milhouse’s Play

While debugging some more challenging positions from The Checker Maven, I encountered the following position which seemed to be giving Milhouse fits.

White to moved, and should be doomed, but isn't against Milhouse.

White to move, and should be doomed, but isn't against Milhouse.

In debugging the preferred line, it seems to be stuck in a short repeating cycle which it views to be best. In reality, the repeated positions should be viewed as draws, which should be enough for them to reject the line, since the database knows that the line is a win. But my program does nothing to detect repeated positions (I briefly flirted with it, but didn’t like the implementation, so I discarded it.) I’ll have to figure this out to solve positions like this.