Added GUID-mapping for loaded resource.

Checks if GUID already exist and prevents loading of duplicated files. Thread safety added.