handle let-bound while loops on the spine
always emit the declarations at the top of a scalar block