is right! since the categories weren't removed by normal means, the items are still technically categorized, which is why they're not showing properly in your gallery. if you make new categories with the same names, the items will already be back in them. otherwise you can simply hit the edit button at the bottom of the gallery items edit page to recategorize them into "none"