Fix some pyflakes 0.8.1 problems

The error is: "list comprehension redefines '<var>' from line <line>"

Change-Id: I42df0c36e4c3187de67df88d4516268a56d4b4c8