Add hasChildren flag.