Does anyone else believe this to be a problem?
One possible solution to this would be to change the "close" icon to a "minimize to AppIndicator\MessagingMenu\SoundMenu\Whatever" icon if the application signals that it doesn't use the normal behavior of the close button. This would make the close button be consistent, and also has the advantage that WM's\themes that don't support it would be no worse off than they are now.
Another possible solution would be to add a "minimize to <whatever>" button to the window if signaled, but keep the close button there. The close button would behave as normal and exit the application, but the minimize to tray button would fulfill the functionality the application needs of closing the window but not the application.
I'm sure there are other solutions as well.