Shouldn't we be checking `db_txn->write_txn` ?