Don't use function in for loop test.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>