Fix copyArray# bug in new code generator