Tests. Fix a bug in histograms over categorical data.