Trees spawning and collapsing is a known issue. As you've seen it can happen under some (unknown?) circumstances that DF doesn't realize that trees and the soil beneath them is gone. Usually this involved cave-ins initially, but probably not always. I think DF believes the trees are due to grow, grows the non existent trees, and then the trees make a Coyote & Roadrunner realization that they're not standing on anything.
It ought to be possible to detect such things and "disable" the bugged trees in the list of plants on the embark, although I'm not aware of anyone having tried that.
I doubt corpse removal has anything to do with it, as corpses are not the creatures, but more the castoff body of a former creature, so the body can be raised as an undead while, at the same time the (citizens only, possibly including residents) creature (the "soul") can rise as a ghost.
Edit: I've looked into the tree cave-in issue:
I managed to create the situation by caving in a large part of the surface (about 40*40) by digging away the soil beneath, build a support, channel away the connecting surface tiles, and cutting the adjacent trees that kept supporting the whole thing with their twigs.
After the cave-in there were a fair bit of collapsing happening, and another indication of something being off was that the roots of some trees close to the edges of the cut area remained (roots magically disappear and are replaced by soil when trees are cut).
I checked the difference between a normal tree and that same tree after it has been cut down (it isn't removed from the plants.all array), and the difference was that the pointer to "tree_info" was null (it's null for saplings as well, by the way).
I saved the game at this stage.
I tried setting the tree_info pointers to null on all trees over the right half of my collapsed area, and all collapses thereafter were over the left half of the area. In addition to that, the left half sported some leaves and fruit on the ground in the same manner as when you dig out the roots under a trunk.
I then went back to the save and set the pointers to null of the left half, and collapses then happened on the right one only.
It can be noted that just setting the pointers to null did not remove the roots that shouldn't have been left in the soil.