Merge "Fix lock contention in AttentionDetector"