perf_counter: Fix ctx->mutex vs counter->mutex inversion