Fix Array.append

Oops, I forgot an if-clause. Fixes #806 and maybe the problem reported by @rehno-lindeque in #647 – could you try it out with this patch?