Toward the end, it kind of turns into a guessing game, so it gets pretty hard to clear without having a decent amount of life left. That’s just how it ended up turning out!
As for the bug, I suspect it comes from a feature I tried to implement. I wanted to keep it ambiguous whether the flagged tiles were actually correct or not when there were about 3 pumpkins left at the end, and that seems to have caused the issue.
Being able to flag a tile and then still left-click to open it seems like the root problem.
This is just my guess for now, but I’m going to review how the end-game logic works and take another look at it. Thanks a lot for the detailed feedback!