Sort tracked items that have subcategories

Sort the tracked items within a category that have subcategories so
that the tracked items without a subcategory specified appear at the
end of the list.