Ah, you're right, but the appearance of the parent tab didn't update to reflect that, so I didn't realize.
So yes, the bug is that it collapses the parent tab (and also doesn't appear correctly when that happens). Additionally, switching to a tab that's in a collapsed tree usually opens the tree, but that doesn't happen in the context of this bug.