BUGFIX: Closing windows in a certain order would cause everything to crash out when opening a replace style link
Support for $.winmgr.templates