Lots of work done to properly handle multi-statement batches wrt error reporting.