Back-port fixes for b/62196835 am: 5bdffc5d am: 5a7eb970 -s ours am: f433884a am: ba928bd5 am: 1add6be2 am: ba460643 Change-Id: I7119e3f003562f6d826d40ad3577b9db0e44c2c6