What is exactly the guid that is available via SUComponentInstanceGetGuid or SUGroupGetGuid ?
I supposed that it gives a unique id that is the same for each loading occurence, but the provided guid seems to change if I load the same sketchup file again.
Were the models saved in an older skp format (2013 or older)? These guids were introduced in SketchUp 2014 and older models do not have them. So, they have to be regenerated every time for an old model, until you save it in a newer format. It will be persistent after that.