Fix case where number of histogram bins is 1.
Force binIdx to be 0.
This test is still completely nonfunctional.
But at least the code makes sense now.