I don't see the point of this line. You're not using item outside the scope of the loop, so why not define item as local inside the loop instead and remove this line?