oops, nasty off-by-one in set_copy