Some fixes to a few bugs that showed up in testing this branch.
Some fixes to a few bugs that showed up in testing this branch.


Former-commit-id: 17c9511e47f278b092a6b8dd9e4e5e7e2bdb7deb
darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide