Merge cherrypicks of [2051873] into emu-31-release.

Change-Id: I4f0396048f679a6ffe43cd63b91f009a864f8bcd