fix regression in Object.dup(array), thanks Nao and Julian