It's not enough to set the parent pointer in the child, the parent also
needs to be aware of its child, so call AddChild() to do both at once.
This ensures that find dialog with non-null parent is destroyed by it
when it is itself destroyed.
Closes#18747.