Fix bin_search for decreasing values.