Clones the registry object rather than sharing references.

This better mimics the semantics of a real world storage (as suggested by @njx).