I'm not familiar enough with this part of the client to know whether you're right about that commit causing the problem.
Can you explain what that commit does, and why it's a problem?
I see the code that rejects duplicate proofs of stake existed before that chance. What was the mechanism for recovering from the network building on top of a rejected block before this commit? Does this commit break that mechanism?