Fix for dictionary iteration in pickleutil