Fix bug where set would sometimes fail within if
Fix bug where set would sometimes fail within if: a task in repo2rlenv-commit-runtime-v2 (Harbor dataset). Title: Variable set inside all three branches of an if/else-if/else block is incorrectly set to undefined
The task
**Title:** Variable set inside all three branches of an if/else-if/else block is incorrectly set to `undefined`
Part of FineEnvs/repo2rlenv-commit-runtime.