Added test that fails due to weakref _instance bug.
Bugfix for weakref _instance bug.