Fix the styling of links in the sidebar when a primary page is selected

fix an issue with sidebar menus when a page is active, but all its sub items are also highlighted as active

e.g. https://developer.wordpress.org/plugin/the-basics/