Someone added a field to the middle of the data set, and didn't increment all the following field id's. (I.e., $7, $8, $8, $9...).
Lesson #1: Be careful when inserting to the middle of a set. If you can safely insert at the end, do so.
Lesson #2: Don't use the numbered regexp capture syntax for large numbers of capture groups. Use ($foo, $bar, $baz) =
I didn't write the original code - I just had to fix it. (Luckily, I like fixing things.)