When a doc appears in more than one category, we want to avoid showing it in the sidebar twice when it is active. This will be especially problematic when the outline view appears nested under the document.
The proposed solution here: include the category ID in the publication route. When clicking from a category we will include that in the route so the doc appears in the appropriate category.
When navigating to a document from outside the group, the category is not known, so the default category of "All Content" will be used. But if the document appears in one (and only one) category, the publication page will modify the route so the document appears in the appropriate category from the sidebar.
This is a tricky and nuanced issue but will be important to make sure groups feel organized.