Porting fix done for CARBON-14838 to Git