Follow-up to https://phabricator.wikimedia.org/rECKTd97f07fdf7d7cfb20a682edcb3e5bf1557d39475
Item IDs are assigned based on the order *once they are sorted*. This is not necessarily the same as the order in JSON; in fact it is only the same if "natural" sorting is used. (Member lists do not use natural sorting but do a totally different thing altogether.) The approach to assigning item IDs should be revisited, or we should have a second ID representing the canonical ordering in the JSON.