Reseting the value of i as an earlier loop could still be in the code window.