ldb_tdb: consistently use ltdb->cache->attribute_indexes to determine if we have...