Cherry pick change 7d8ab1a30a into twintegration branch.