I did a little test just now, I'm able to break a map by following these steps:
- place some scenery of different types
- delete a few of them
- clear unused scenery
- undo (error!)
- save
So I think clear unused scenery + undo is the problem. I'd suggest that you only do clear unused scenery at the end of a mapping session, and don't save after you get that D3D error because it means the the map data is corrupt. I'll have a fix for this in the next version (probably I'll make it clear the undo history after clear unused).