Detect tight loop in tdb_find()