Ensure that a call to withTransaction always opens a new read-only transaction, if one was started upon invocation.