Fix errors with foreach statement

I am getting "Invalid arguament in foreach" in the Comments extension.
I'll have to figure out what's going on there, but for the moment, this
check should fix

Change-Id: I1d24a1ad9cc1b5823cb45f3fce23f45f8bd905d8
Merge "Fix errors with foreach statement"