Closing and opening the sidebar when the side panel is collapsed currently expands the side panel to the most recently opened panel, even if it was collapsed at the time the sidebar was closed, and also incorrectly doesn't set the nav button as selected. This changes the behavior of expanding the sidebar to not open the side panel if it was not opened at the time the sidebar was closed.