Change a list comprehension to a foreach/2 call

Partly to avoid unmatched return warnings from dialyzer and in order
to preserve the style of other similar-looking code in that file.

While at it, fix the wording in one comment.