If this issue is happening when you run Photoshop, Photoshop must be interfering with other Windows applications in some way, possibly by using up available memory. Lack of memory will lead to all kinds of side-effects. If this is what is causing the MDI handler to work incorrectly, and to create duplicate MDI icons, there is little that can be done unfortunately.