Fix segfault in instrumentation code.