Remove a redundant for loop.