5e0ac4e8ea
We need to make a copy of the iteration variable in the for-of loop so that the distinct values are available in the callback.