Added test that fails due to weakref _instance bug.
Bugfix for weakref _instance bug.
Merge branch 'master' into pr/592
Fixed EmbeddedDoc weakref proxy issue #592