Merge cherrypicks of [17104573, 16905018] into sc-d2-release.

Change-Id: I5af062a9fcb39ac9ac211f0c4ead214d1658b03d