It turns out this never really gets called with an undefined index, because even when it's called in the initial loop that populates the list, the index gets implicitly passed by `forEach()`. I briefly considered reverting that code to the original version from before the last code review (where we explicitly called this function without an index), but decided that it's basically equivalent either way.