Fix histograms with 0 or 1 unique values. Fixes #430.