This is worth its weight in gold.
It seems some program behave themselves in Windows 7 task bar and some do not. Lets take a couple of examples. Firstly Internet Explorer. If I have IE pinned to the task bar and click it, the pinned icon gets a highlighted background and as I open more web pages it takes on the appearance of having multiple pages in top of each other. This is the correct behavior. Now try an application that does not behave, iTunes (go figure) when I click on a pinned iTunes shortcut it creates a second icon on the task bar to represent the open window. Not only is this contrary to expected behaviour, it is messy, wastes space and it is almost impossible to tell the difference between the pinned shortcut and the open window since both icons are identical. Here is the process to fix this:
1 - Open iTunes by clicking on the pinned shortcut.
2 - While iTunes is open, right click on the second icon and pin it.
3 - Unpin the first icon.