This might not be necessary in this very case because the first cursor is RO. If the cursor was RW, then the reads after it (according to the current dbm_lmdb.c) will be AFAIK using a write txn.