Fix concurrent access to children array.