Fixed bug with Teradata queries that ended with a no result-set query like an insert or create