Given set sizes and an index, returns the index of the set
The given index is for the concatenated list of the sets.