I don't have a solution but I feel like I know the cause perhaps.
Yesterday I started trying to rewrite MQ2Rez from scratch. I found that if via plugin I told the player to select "Resurrect" to spawn at my corpse to see if it was ready using the same code that was in MQ2Rez, but I had not yet received a rez, that it would invalidate my corpse, even while I was hovering on the corpse. I would have to /notify RespawnWnd OptionsList listselect 1, then while still hovering have my cleric cast the rez in order to actually get a rez on that corpse. If I didn't do that, when the timer ran out I would stay hovering on my corpse and would have to force close the game, when I came back to the game I was alive and where I died, but my corpse was invalid and couldn't get a rez.
This was the only way I was able to duplicate an invalid corpse on purpose.