Prevent loop variable capture that resulted in misleading messages

Also log the linterName.

Test Plan:
Linted a file and saw log output that made more sense.