Fix a Handle leak when reporting transaction errors.