Changed logic in categories.

Prioritize sub-items over being a category.