Looks like the test here is backwards.  If v[lo] < v[mi], we don't want to exchange, right?