Adding fixes for CARBON-14867

This reverts commit fb453bfe92a5fd3e01547570b3c244c17572140d.