Simplify `run_locally` by assuming `fail` will not be redefined
Remove three cases of unnecessary variable shadowing