Merge "Mitigate the races during installation" into tm-dev