Trivial: Use inline function instead of var

I had moved this to a var to avoid a JSHint warning, but that was actually
caused by the outer loop instead of forEach. A comment silences that one, so
move the inline function back.

Change-Id: I864fae6963cd775fb3c76a9c8bd5a94bf6a736a4
Merge "Trivial: Use inline function instead of var"