Q:

Dealing with a tremendously popular answer that's been edited to something wrong

I've recently run into the accepted answer to Why do people say there is modulo bias when using a random number generator?. With a score of 247 on a page that's been viewed ~19,000 times, it's a fairly important answer. The problem is that, the payload of the answer - the code snippet toward the bottom - is completely wrong, as far as I can tell (it states that dividing two integers will result in a number between 0 and 1). 
Having looked at the edit history, it seems that it's not just a technicality. The original answer went in one direction, and at some point, it was modified to a completely different direction. I don't want to revert the content for two reasons:

I can't tell when the votes came in relative to the edits, so I don't know how many votes each version got (therefore, I don't know if I'm "restoring" the "upvoted" answer).
I really don't know enough about this topic.

So what should be done in this case?

I flagged the answer for mod attention, but it was declined with a "declined - flags should not be used to indicate technical inaccuracies, or an altogether wrong answer" message.
Adding a comment to the answer is pretty much useless - in fact, there is one there asking whether the current solution is completely wrong (as I think it is); I just barely noticed it when trying to add a comment to that effect.
I suppose it's possible to add an edit in the answer saying that the content has been significantly changed, but am not sure what's the etiquette on that.

A:

With the timeline to the rescue, I tracked down the edit that introduced the code snippet you're talking about. This edit rewrote a code snippet present in the original answer with the comment

Better formatting and removed awfully inefficient example solution

This was on October 5th, 2015. Since then, the answer has attracted 14 upvotes and 1 downvote (so its score before the edit was +234.) and no other edits.
This edit clearly conflicted with the OP's intent and should be rolled back. I took the liberty of doing just that.

