In the app I am working on, I allow users to select features from a feature layer, which I add using MODE_SELECTION. I have it set to zoom to the extent of the selected graphics, upon the end the user drawn polygon. The issue I am having is odd. When you do the selection for the first time in the session, the features are selected, but the extent doesn't change. If I perform another selection, it zooms to what the previous selection extent was. If I do another selection, again it zooms to the previous selection's extent and so on.
If I add the layer using MODE_ONDEMAND, it works perfectly. Anyone know what I am missing? Attached is the querytask code.