glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.