Fix race condition with updating teamStore and g.team*Cache variables.
Merge remote-tracking branch 'upstream/master'