Maps have gaps in their indices, so this function translates a logical index (ie. Nth element) to an internal index that can be used for the other functions in this class. NOTE: This is slow, do not use this for iteration! UseCreateIterator()instead.