The correct way to do:
"Mapping the 'X' icon on the top right of a Dialog to behave the same"

Due Credit to William for catching my erroneous fix, that broke the
nav tree state.

Ticket: #6349