Interesting topic. I've noticed this problem for years but have gotten used to it. It certainly happens on Sonar 8.5 but I believe earlier versions as well. Yes, I have an M-Audio keyboard and its interesting to know that it might be the culprit.
Sonar doesn't crash that much on my system, but when it does SONARPDR.exe is almost always running in the background and the MIDI indicator remains visible. I almost never reboot. I just open task manager and click "end process" a few times. After a while, SONARPDR.exe goes away. I don't think it would take less time if I waited for a reboot.
Although I use X1D, version 8.53 is still hanging around on my system, as it takes me a very long time to delete a previous Sonar after installing a new one. Force of habit.
Anyway, I discovered that if the Midi indicator remains after an X1 crash, I can make it go away by firing up and closing 8.53.