Fix an issue with windows being restored from the taskbar (part 1 of issue #62).