Implemented TBB function for stable_sort_by_key