Do not try to re-open the db on IOError if the connection is in a transaction, as that will fail anyway and mask the underlying error