Only rollback transactions if they are active.