Added assertions to halide_dev_run to ensure module state is valid.