Removes duplicate indexes