[registry] Add support of doctrine proxy objects. Hotfix.