Fixe for when deep cloning circular references
New version with layers referencing manager