Add the category to the result array when looking at a discussion.
Tweaks to discussion sorter.