GDScriptParser - don't use index operator on linked list
Index operators are super slow with linked lists. This came up in profiling the parsing, iterating sequentially using iterator is much faster.
(cherry picked from commit ef914dac31f23fb8bd4c5e498a68ebd4ca4e1430)