fix handling of consecutive optional arguments am: fea05c6dca am: 76bdc68d7e
am: d8c4bac697

Change-Id: Ifcc3ca90850c83f21dbd0eaaf2f3b706de01b75a