[WGSL] Global variable rewriter should not use range-based for loop
<rdar://problem/121208769>
Pull request: https://github.com/WebKit/WebKit/pull/22930
Committed 273224@main (91061b48751d): <https://commits.webkit.org/273224@main> Reviewed commits have been landed. Closing PR #22930 and removing active labels.