Merge cherrypicks of [16790769, 16820286] into sc-d2-release.

Change-Id: I32d2970e8c6a914aa8ed9135e35c1f663d4d2bf3