Off by one error in leading_bit.