Fix segfault in Twig instrumentation.