I thought the channel names were already sorted in the source data file, but it turns out they aren't. I now sort them after sorting the category names.
This was becoming tedious to maintain, so I wrote some code that will maintain it for me