Hi Marius,
What version of ROOT are you using? I just tried your script within ROOT v5.27/06 and it ran fine for me (produced two identical plots at least).
I believe there is a bug in v5.26 with the weight handling in RooDataSet:
[url][RooFit]: random weights when doing RooDataSet->append?
It could well be that this is the cause of the problem you are seeing.
Regards,
Andrew