isl_pw_multi_aff_substitute: improve error handling