Fix dom builtin (error case could crash)
Fix dom builtin (error case could crash)

jjdekker/libminizinc,jjdekker/libminizinc,tias/libminizinc,nathanielbaxter/libminizinc,jjdekker/libminizinc,jjdekker/libminizinc,tias/libminizinc,nathanielbaxter/libminizinc,nathanielbaxter/libminizinc,nathanielbaxter/libminizinc