Retain reference to target in Registrar so a GC run can't confuse ongoing serialization.
Merge pull request #199 from mjtko/fix/yaml-registrar-mappings

GC can break an ongoing serialization