[Bug 640793] Valgrind/Callgrind segfaults with deeply nested c++ templates