Merge to upstream r304942.

Test: make checkbuild
Test: ./run_tests.py
Bug: None
Change-Id: Ife00da6e2ce8d030886fd9a94d0417e0db784222