Fix two valgrind integration regressions.

The regressions were never merged into the master branch.
2 files changed