Remove redundant loop in dexsearch