confusing "ReadOnlySaveError"

Working on the same add-in as last time I posted, this time on a new kind of problem. We have a number of external documents we pull in and assemble in this addin, and they are all supposed to conform to certain naming conventions, so that we can generalize calls to mate them. However, over time, a healthy minority of a certain kind of part has become non-conformist, the faces not being named correctly. I figured out how to determine which face was supposed to be named what, and renamed the faces in the add-in conditionally if they started off misnamed, but this causes a "ReadOnlySaveError" when the add-in saves the finished drawing. Why is this? I don't get the error if a correctly named part is inserted.

SolidworksApi macros