curr_inx needs to be reset correctly on each line. Overlooked in commit cbc0b901 when that was moved to a global variable. Bug 5831.