This might not be restricted to this particular circumstance, but when a list variable is used in a For Loop, a reference to the 10th item in the list fails and actually refers to the 1st item in the list. If this description doesn’t make sense, run the attached example. After it has been run via the Test button, look at the new_string variable. The 10th, 20th, and 30th data point are incorrect.
Can’t tell you how frustrated with one of my piston I was until I found this error and reproduced it here. The problem may exist in other circumstances and list data points, but hopefully the example is enough to locate the bug.