Fixed small bug in calculating lower bounds during sorted lookup