Fix assert trap in schedule_to_source()
Fix assert trap in schedule_to_source()

Don’t call LoopLevel::var() unless we know is_root is false

jiawen/Halide,kgnk/Halide,ronen/Halide,kgnk/Halide,jiawen/Halide,kgnk/Halide,ronen/Halide,kgnk/Halide,jiawen/Halide,ronen/Halide,jiawen/Halide,psuriana/Halide,kgnk/Halide,ronen/Halide,ronen/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,ronen/Halide,jiawen/Halide,jiawen/Halide,psuriana/Halide,psuriana/Halide,ronen/Halide,jiawen/Halide,psuriana/Halide,psuriana/Halide,ronen/Halide,kgnk/Halide