I found this problem also. The children shortcode works fine for me when I generate the HTML on 0.39 and below. If I am running hugo serve in those versions and make a change to the site, the children shortcode also pulls all directories and not just top-level, but I didn’t mind that so much because I didn’t see the problem in the final HTML build.
From 0.40 and up I see the problem in the final HTML build also.
Note that the home page is special in this case. $home.Pages will be the “site’s pages”. So for the home page you may check that eq .Parent $home or something. I’m sure someone else will come up with something better …