Use an ordered list for the work list, which is a bit quicker than IntSet