Merge "Protect callbacks from concurrent modification" into main