Move grunt.flags() call outside iteration