Strange behaviour when shift selecting in tree

I don't feel this is intuitive. I get unexpected results when shift selecting widgets starting from "root" and also when starting one child in. In the gif I am holding shift and selecting each widget with the left mouse button.

Gif

It's a bug, but I think it's already fixed in sources.