Fix introduction of fresh variables from arrays
Fix introduction of fresh variables from arrays

A temporary VarDecl was used for flattening instead of the one actually put into the model. This only worked by coincidence since they both had the same Id, but changes to the temporary's domain were not reflected in the actual VarDecl.

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