I concur with your thesis that the right answer to the wrong question is unhelpful; but the better thesis here is don't change the question once it's gotten an answer!
Having been in this situation before, I understand why you felt it was a good idea at the time.
However, I believe this is the wrong strategy to address the particular problem. As I see it, the only situation you found yourself in was the nullification of your answer through query editing. In other words, the OP, or someone else, changes the fundamental nature of the query, which action now invalidates your answer.
The idea behind query editing is to improve the question, not change the question. Once a question has been answered, its fundamental nature can not be changed.
The only reasonable strategy that aligns with how SE works is to first address your concern in comments. You inform the OP that these certain edits need to be reverted or revised because they invalidate your response and here are the reasons why.
If this doesn't provide a satisfactory response, then you should feel free to edit the question! A quick revert with a factual explanation as to rationale is sometimes the refreshing splash of cold water a new or recalcitrant OP needs!
If the OP dereverts the query, thus reinvalidating your answer, please feel free to a) rerevert the question and b) flag for moderator intervention.
If new information threatens to substantially alter a question, it really falls to the OP to simply ask a new question.