Don't jump to the deadlock handling code unless we're in a transaction.