Fix F812 PEP8 error

One file was redefining a variable, thus exposing this PEP8 error:

    F812 list comprehension redefines 'n' from line 1868

This fixes it and enables the check in tox.ini.

Change-Id: Ifa9a2365160db1b8ec80b274f3458cea6bd1f653