Try this.
Generate the whole lot and then create a couple of copies of
the output.
In one copy, go to mergedProjects and delete any child
project. Open the startpage of the parent and you will find you
have a merge but without that child.
Now go to the other copy and delete a different child. Open
the startpage of the parent and you will find you have a merge but
without the child deleted in this copy.
The merge occurs when the startpage is opened by the user. It
presents whatever children are found. If any are not there, they
will not appear in the TOC, index or search.
Experiment a bit with copies and you'll soon see how it
works.
Does that clarify it?
Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.