   package require Tk
   update
   set fn [tk_getOpenFile -parent .]
   puts "fn:$fn"

Fixes the simple test case, as it prevents the file dialog from opening before the main window.

My application is still failing with these symptoms without any withdrawn or minimized windows and I don't know how to make a simple test case for it.