Recompute domain4inversion if domain changed

issue4174
review5621002
Simplify WinSearch usage

issue4006
review8571003