tracing: Fix race with max_tr and changing tracers