This is where the investigation started: this function was called on UI load at the moment when items() would return an empty list. [value] was 0, and valueToIndex(value) returned 0 as well, so there was an exception here.