generateBinned problem with workspace loaded from file

Hi,
I have a problem with RooAbsPdf::generateBinned function, when I get the pdf from a workspace saved in a file.
The problem is the following (reproducible with the attached script):
If I prepare the workspace and generate data all in once, the data reproduces the shape of the pdf;
while if I load the previously saved workspace and try again to generate, the data is flat…
Note: generating unbinned data works well in both cases.
(Infos: I’m using the trunk of root updated two days ago on an openSUSE 11.2 machine)
Is there something I am doing wrong or is it a bug?

cheers,
Francesco
test.C (2.1 KB)