Fix segfault on invalid query syntax.

VAST used to segfault when receiving a query with invalid syntax, d'oh.