Fixed array overwriting in ArrayUtils::merge()