Yesterday I answered this question. Last night the OP edited the question to include the working solution, so this morning I suggested this edit that rolled back the change. My comment on the suggested edit was:
Rollback to Revision 2. If you want to post your complete solution, do it as an answer, not by editing the question.
A short time after proposing the rollback, the edit was rejected with the rejection reason:
This edit deviates from the original intent of the post. Even edits that must make drastic changes should strive to preserve the goals of the post's owner.
The question I have is: was this rollback edit suggestion appropriate?
I ask mainly because I'm approaching 2k reputation, and I want to be sure that the edits I'm making are good in general. This rejected edit makes me question whether it was the appropriate course of action to take. The review history shows a 50/50 split between accept and the rejection reason above.
(Note: The edit comment is mostly aimed at the OP so that when they look at the revision history of the question, they can see why I proposed the rollback, and what they can do instead.)
(Note 2: I've also avoided putting my personal opinion about what happened in this case, so I don't influence the discussion one way or the other.)