Fix possible infinity loop in ag/417350

ag/417350 is a cherry pick of the merged CL ag/416106 which
is why this is in klp-dev. I will cherry pick this into klp-docs
after it has been merged.

Change-Id: Ifcf1fc901acd73ad9ccfef789b73cd5a62a6302c
1 file changed