PersistenceLoader now works with enums in the generic types of fields, fix NPE in ScriptCompiler