tracing/events: Fix locking imbalance in the filter code