Ensures transaction committed/closed is in same try block

to absolutely make sure that a transaction id marked as committed will
have its counterpart, marking as closed, sit in the finally block of
the try block marking as committed.