Fixed compilation of the foreach loop primitive.
Clock example now uses foreach loop primitive again.