Used "Enumerable.OrderBy" instead of "List.Sort" for stable sort
Merge pull request #2778 from Benglin/TaskOrderingFix

Fix the indeterminism in task ordering