Order milestones by due date. Fixes #3798.