Parent/child: Reduce memory usage in top children query.

Closes #8165
Closes #8160