Agreed, this is ugly, I'll make it nice. In the current state segmentOrdToGlobalOrdLookups entries could be null (all of them), so that is why I resorted this hack.