Other fixes to has_categories.