Fix column ordering for categorized views

Same as PR #50, but for categorized views.