code: private long nextSegmentIndex(long segmentIndex, Segment segment) {
          long segmentsTier = this.segmentsTier;
          segmentIndex <<= -segmentsTier;
          segmentIndex = Long.reverse(segmentIndex);
          int numberOfArrayIndexesWithThisSegment = 1 << (segmentsTier - segment.tier);
          segmentIndex += numberOfArrayIndexesWithThisSegment;
          if (segmentIndex > segmentsMask)
              return -1;
          segmentIndex = Long.reverse(segmentIndex);
          segmentIndex >>>= -segmentsTier;
          return segmentIndex;
      }
docs: Extension rules make order of iteration of segments a little weird, avoiding visiting
  the same segment twice
  
  <p>Geven segmentsMask = 0b1111, iterates segments in order:
  0000
  1000
  0100
  1100
  0010
  .. etc, i. e. grows "from left to right"
  
  <p>In all lines above - +1 increment, that might be +2, +4 or higher, depending on how much
  segment's tier is smaller than current map tier.