Fixed issue with $query object being overwritten by string.

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31401

This fixes this error:
```Fatal error: Call to a member function clear() on a non-object in /libraries/cms/installer/installer.php on line 1127```
This occurs when updating an extension.