[Bug 14366] co-operate with valgrind when switching stacks