PDF export: Empty top level in TOC

The bug is very visible when you export the default Welcome file.

Same bug in export on both on MacOS and iOS: