fdo#81004 this looks like a mis-merge to me

Change-Id: I2d30774a8a89002b6c2d8487bfce15eb13c82e0d
simplify loop

Change-Id: I26c1456ca805c6f3ecfa5bd4876e7ae345f087e7