Replaces a .each iterator and associated closure with a for..in statement.