bug in shared variable construction in __setstate__