Specifically to Pierre's point, are the groups collapsed when they are selected (i.e. the child layers hidden in the collapsed group). More details (step by step) would be useful.
A screen shot of the layer selection prior and after the command or a full video of your process could be useful :
Hi, hopefully this clears it up. (might want to fullscreen for detail, of course)
This only seems to happen when selecting collapsed folders. I find it odd that it affects the bottom most folder differently.
On expanded folders selecting everything (folders plus contents) or just the contents gives the same result