#123: Fixed issue with folded data sets.  Also provided unit test.