pmd: fix #1176 ShortVariable false positive with for-each loops