Another issue is when a user has not tags, then at some point collapses the Tag header. Later when they add tags they won't appear in the list and it won't be clear why. Also true in rare cases where a user has no notebooks. And indeed there's the case where the user might collapse a header without noticing it, and later wonder why all their notebooks or tags are gone.
In any case it's always good UI to indicate the state of a component. I think your proposition is nearly there but it needs a few tweaks to make indentation consistent. Tessus also makes a good point that we should make sure not to lose too much white space because of it, so it might be a matter of reducing padding or widths of certain components.