Merge cherrypicks of [17654271, 17804723] into sparse-8408747-L58900000954184107.

Change-Id: I490f5d426b3b5e33fdf0ffeb2cb73d00754da9c6