Fixes #2175: QueryBuilder will now append UNION statements at the end of the primary SQL
more union fix.