Bug fixed (weakref + deepcopy interaction)--working again, now with cache