Summarizing, IFC Guid is different in the exported IFC file and in the IFCGuid written in the revit parameter automatically.
As the title explains, I have found an issue where certain elements (a roof in this case) have slightly different IFCGuids in the exported IFC (while reading it out of Revit) and in the IFCGuid that revit overwrites each time I do an export.
The following screenshots display an example where one of the the last 5 characters of the GUID changes "Outside" or "Inside" revit.
Inside Revit, ending with "...csLI7lf"
Outside Revit, ending with "...c_LI7lf"