[WIP] Tentative fix for bug 8008

*** To be tested before committing, please rebase&&edit later ***
http://hercules.ws/board/tracker/issue-8008-copyarray-fail-on-a-referenced-array-argument/