Downvotes and Upvotes are a means to ordering the list of answers, not a reward or a punishment.
If an answer no longer fits a question due to editing, that is exactly the same as an answer that never fit the question - it's the current state that matters, purely for ordering the list purposes. The most useful (to that question) answer should be on top. The least useful at the bottom. This is so people looking for an answer to the question can get the most information in the least amount of time by reading top->bottom.
The community isn't venerating heroes and casting down villains - it's acting as a highly complex sort algorithm. It's not perfect, because what the 'community' thinks is most useful is not going to apply to outliers, and there's stuff like this - cult of personality and confusing upvotes with personal approval. But the overall goal is to simply sort the information, not to pass some sort of moral judgement.
Additionally; If the answerer wants to preserve his answer in the face of a radically different question, he is free to re-ask the original question himself. There is nothing wrong with this, and if his answer is good, it is what he should do.