Micro-optimization for get_categories()