Remove duplicates when removing invalid results.