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

Change-Id: I212c02b69b7d9aa773a8ed1a013a3ff3dd643612