Fix valgrind failure caused by test order change.