Problem is that you need to have the thing work also in terms of gameplay.
Dwarves die. Sometimes they even die from old age. You need some sort of mechanism to allow the player to put dead dwarves to rest. Coffins are already in the game, and the way coffins work is that the dwarf corpse object is put inside the building object of a coffin. As the corpse object is inside a building it is not laying around on the ground somewhere, such as at the bottom of a chasm or in a stockpile, the reanimation mechanic I described won't work on it and so the corpse will be immune from reanimating assuming it is in a coffin.
Remember, I am trying to keep the idea simple, to work within current game mechanics as much as possible, and yet still have a large impact despite the minor changes. Less work for Toady, more FUN for us. Everyone wins.
Just having an X% chance of a non-buried corpse object reanimating each month or season change, with the corpse object being despawned and in its place a zombie or skeleton spawning of the same creature type, would involve very few changes made by Toady and even with a few relatively minor changes you get an entirely new gameplay mechanic, including undead hordes shambling about outside the walls of your fortress, with migrants, liaisons, caravans, and sieges all adding to their numbers.