Drop useless code.
Revert "Fix lib/to_tree.js on sections with `parent` === undefined"

It actually has no sense.

This reverts commit 434b0332ebeeba9e5230bf62f3485da5e7d590cc.
Fix fatal error when visible section is a descendant of invisible one.