Dave, I'd be happy to clean up the proc while I'm at it. Thanks for the response, Gustaf.
Only planner and learning-content packages use category::get_children. In a few places, they do an lsort -increasing on the children ids. A sort of the children in the proc would only affect these existing calls (the children would be sorted twice).