Site.assembleSections logic assumes that the the home page would always be the first in the Site's list of pages. This is not in fact guaranteed to be true. When it is not, the method can fail to set the parent for some or all root-level pages.
Fixes #4447
This commit fixes an issue introduced in the recently released Hugo 0.22.
This logic did not handle the case with root sections with non-section subfolders very well.
Fixes #3586