Merge "Fix race condition in flavor tests"