The problem is that the mesh it's saving is not the right layer. When the new layer is made from the resample, the scripting interface fails to capture a) changing layers and b) deleting the layer with the original object. Since the new object is contained within the old object, it's totally invisible in the new mesh.