It's a known issue and there are suggested fixes. I have not personally tried fixing it because, I use MixZing (not my favorite but I'm in dire need of a new media player that isn't the 3 beta one) and I just pause the music then unplug. No "ghost music" for me.
Fix for "music starts when unplugging headphones" problem - xda-developers

ps - @sanchez : I Just noticed your Member #.... O_O lol jp