It looks like there's a bug when using a while block inside an if block...
I have opened the relevant issue to look at it later:
https://github.com/haroldo-ok/vcs-game-maker/issues/109
BTW, aside from the code generation bug, there's a chance that the `repeat` block won't work in a useful way with that arrangement:
Fixed the code generation bug: https://haroldo-ok.itch.io/vcs-game-maker/devlog/811947/version-0253-fix-nested-...