I had a problem that some replacement script seemed to abort without error in certain cases.
After longer search I found out that the GUID I generated (by creating new objects in VBA and stealing their gid property content), was trailed by two whitespace characters which caused the abortion.
guid=left(guid,38) fixed it. What a mess. grin