[automerger] Fix possible out of bounds read am: 3762e06152 am: ecc92a1a86 am: 1c7bb87a42

Change-Id: I67887296e09db454c57a3e5026eb7c5d14295084