fixes #674: Copying objects with local variables

 * fixed the double variable issue
 * fixed some reference issues regarding the ```ChangeVariableBrick```
   and ```SetVariableBrick```

**Jenkins testrun:**
https://jenkins.catrob.at/job/Catroid-Multi-Job-Custom-Branch/374/