Update the query when updating the selection.

query gets updated when selection changes as a computed property.
However, when a user changes the query and selects the same selection,
query does not get updated. This change fixes that issue.