tdb: use tdb_nest_lock() for open lock.