You should not be modifying the input data.  rather than assigning the placemark.id here, you should see if it's defined and if not create a GUID for it.  But don't create an id property on `placemark` itself.