1.20.7 build fix cherry-picks
This cherry-picks a couple of fixes for build errors (in certain configurations) that snuck in with some of the 1.20.7 patches.
This cherry-picks a couple of fixes for build errors (in certain configurations) that snuck in with some of the 1.20.7 patches.