One more question if I may: I try to exclude global subnodes but so far unsuccessfully. Is it possible?
This correctly exports the corresponding node only:  items("SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = ""
Now if I try to exclude this node from the SOMEGLOBAL like this,  items("SOMEGLOBAL.GBL",'"SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = "", it does not exclude it. There is a barely visible single negating quote in the beginning of the second item.

I hit largely the same $System.OBJ.%Save <ZSG> error, in a code you cannot see, of course. After reading this thread I realized that the only unusual thing I did is to give my programmatically created project a numeric name. Apparently, there is a check inside %Save: if numeric it must be an object ID and not name… The error was gone as soon as I added a letter in the beginning of the name.

I am also on Cache 2017