Fixed bug 9916: added the "TABLE" bit to the query.

See http://tracker.modx.com/issues/9916