Fixed bug that happens when parse_query is passed a Query object.