Fix IndexOutOfBoundsException in binary search (issue #63).