Weird! That's a weird thing to happen on Mr. Do's Castle since dying and completing the level usually just results in living. You must have done it just right.
I did that once for Galaga -- I was having a great game but got hit at the very moment I was about to get sucked up into the tractor beam. It ended up sucking up the cloud of smoke, and the game really freaked out after that.