add keepweakref keyword to Dataset.__init__