Weird side effect of GLOBALHIDEHIDDEN and HIDESYSTEMFILES

I have an older button configured like this:

Set GLOBALHIDEHIDDEN=Toggle
Set HIDESYSTEMFILES=Toggle

Weirdly, clicking it causes the folder tree to completely collapse all branches. It doesn't matter if the previous state was on or off - and it only happens with these two commands combined. What's going on??

Of cause, now we have the SHOWEVERYTHING command that fits the bill even better, so it's time for me to get with the program...