Merge "Reduce lock contention in ContextImpl" into main