Rather than using `indexOf` to place each userId in an index back in the userIds array, can we iterate over `flatLoginIds` and pick them out of a hash of `loginId -> userId`? That way there isn't some implication that you could somehow set `userIds[-1]` to something.