Fix bug when datafile was changed and nobs resulting from old dataset wa...

...s bigger than is possible in new dataset