Changed according to Ulrich's research
Moved to calculate_segment_rank_not_memoised