Merge "Correctly handle instrumenting threads multiple times."