Auto expand app in sidebar

If I highlight a view in the side bar and then I collapse its parent app, when I expand another app, the sidebar view is refreshed so that the first app goes back to also being expanded again. It seems to be related to whether or not the second app contains a smart folder.
I hope that makes sense. If not, I can send a video via intercom or whatever.