Merge "Fix bug found by fuzzer." am: 1d6a3acc9e
am: 9bf73d3723

Change-Id: I05a362c658240ea91fe84d4b2b56e8e07c3c9c06