The compiler does lifetime analysis, and there is a "reference borrowing" concept like in Rust.
That is, it's not just "rewrite your program until the prover succeeds".
Also: will be/is the lifetime-checking done in the same way in the interpreter, even though it uses GC? Otherwise, those are in effect two, I think significantly different dialects of the language.
I'll try to do as much checking as possible in the interpreter so that the transition from interpreted to compiled code is smooth. Right now there is none though.