Merge "Don't corrupt the thread list in static executables."