Fix double-close of transactions if yields fail.

This was causing the exception that caused the failed yield to be
swallowed instead of propagated, as the second close was failing
due to lack of a DB lock on the thread.

Bug 5515111

Change-Id: Ic847801655b28301913b07b3929794b3ba16c5ae
2 files changed