The bug occurs with the latest version of Jenkins (2.64) and all the plugins. Whenever you create a Closure in a loop the latest instance of the iteratee will be used when the closure is executed.
This happens with all loops: for(int i = 0), for(Item item: items), each, collect, etc.
Minimal example, reproducing the issue:
This bug is usually encountered when trying to create parallel steps out of a collection. But since I was able to reproduce the issue without using 'parallel', I hope this might shed new light on the underlying problem.