In general, completely changing the meaning of a question is frowned upon throughout the Stack Exchange network. This is especially true if the edit invalidates one or more existing answers.
For your situation in particular:
- The question has not been edited since May.
- All of the edits were on the same day it was asked (May 18).
- Your answer came over a month later.
Given these facts, I strongly hope that the asker does not change the question into a different question again. If they do, those changes should be rolled back and the asker instructed to ask a new question. If you get into an edit war over this, please flag for moderator attention and explain the situation in as much detail as possible in your flag. The site moderators will (I imagine) roll it back to the state it was in when you wrote your answer, and if necessary, apply an editing lock.
Ideally, people would not do this sort of thing at all, but given that the question is now over a month old, nobody tried to answer one of the older versions of it, and the older versions were not "live" for very long, I am inclined to let this one go. We may want to advise the asker not to do this sort of thing again, though.