Fix crash when exporting a 2D project containing 3D content (#1680).