Remove redundant for-loop.