You get this problem when you change the window styles that affect the visibility of a window in the taskbar, you naughty little tinker.
For example, if you change your windows extended style to include WS_EX_TOOLWINDOW style (a common trick to prevent a window appearing in the taskbar) and then fail to reset the extended style before closing the window, the taskbar shows a phantom gray button, which vanishes when clicked.
Solutions?