Valgrind cleanliness for scan1 test.

Reported by Huanchen Zhang via Andy Pavlo.