Getting an attribute via attrib.get() simultaneously with replacing the attrib dict can lead to access to deallocated dict.