Workflow generation: sort worklists so that the result is constant.