API: fix document.copyObject not working when with dependencies
API: fix document.copyObject not working when with dependencies

copyObject failed with an error when attempting to copy an object with
dependencies from one document to another.

http://forum.freecadweb.org/viewtopic.php?f=22&t=13533&p=108288#p108288

Fat-Zer/FreeCAD_sf_master,chrisjaquet/FreeCAD,timthelion/FreeCAD,bblacey/FreeCAD-MacOS-CI,bblacey/FreeCAD-MacOS-CI,timthelion/FreeCAD,chrisjaquet/FreeCAD,usakhelo/FreeCAD,usakhelo/FreeCAD,chrisjaquet/FreeCAD,usakhelo/FreeCAD,wood-galaxy/FreeCAD,usakhelo/FreeCAD,usakhelo/FreeCAD,maurerpe/FreeCAD,kkoksvik/FreeCAD,chrisjaquet/FreeCAD,wood-galaxy/FreeCAD,usakhelo/FreeCAD,maurerpe/FreeCAD,timthelion/FreeCAD,chrisjaquet/FreeCAD,wood-galaxy/FreeCAD,maurerpe/FreeCAD,maurerpe/FreeCAD,timthelion/FreeCAD,bblacey/FreeCAD-MacOS-CI,kkoksvik/FreeCAD,wood-galaxy/FreeCAD,wood-galaxy/FreeCAD,Fat-Zer/FreeCAD_sf_master,kkoksvik/FreeCAD,Fat-Zer/FreeCAD_sf_master,timthelion/FreeCAD,bblacey/FreeCAD-MacOS-CI,kkoksvik/FreeCAD,timthelion/FreeCAD,Fat-Zer/FreeCAD_sf_master,wood-galaxy/FreeCAD,chrisjaquet/FreeCAD,chrisjaquet/FreeCAD,bblacey/FreeCAD-MacOS-CI,usakhelo/FreeCAD,kkoksvik/FreeCAD,Fat-Zer/FreeCAD_sf_master,bblacey/FreeCAD-MacOS-CI,bblacey/FreeCAD-MacOS-CI,maurerpe/FreeCAD