Read-only transactions were not being closed

We have failed to close read-only transactions, which can lead to resource
starvation.

Change-Id: I62dbf6b6409a65f279b01c3bb5b2238ffa6febc8
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 16cdb27ad01eb27950aba2c6fd5e4b03881a623a)
Merge "Read-only transactions were not being closed"