Document with Smart Object layers the share an object with other an object with other smart object layers. Documents are occasionally corrupted by Replace Content. Though it may look like the replace content worked correctly and all layer that share the object content are updated. The next replace content fails with a Program Error of if scripted the script receive and error user canceled. This further corrupt the document. Additional Replace Content operations do not fail however, all smart object layers that share the replaced object contents are not updated.