Fix tracebacks in saltmod state, saltutil.cmd{,_iter}