Automatically remove reference to frame from window list. Bugfix