Copy dictionary and modify it without affecting the original

the original function was run in the scripting console with a real dict, not with the properties

the types of "dicts and arrays" from properties are AbstractMutableJythonMap,AbstractMutableJythonSequence

Ah ! I missed that !

Oops! Good catch. Original function corrected.