Runnable code, reproducible in any engine:
Viewing AllResults shows two records with hasChildren=TRUE and two records with hasChildren=FALSE. The next two named results don't return that information correctly, however.
The graph of the code (enclosed) shows that the DoesNotHaveChildren result actually originates from a NULL, so never even tried to filter the requested results.
If you mark the DENORMALIZE() call as INDEPENDENT then you get the expected results.