hist: handle special cases in bin_to_edge_slice