Changed vec_swap() so that it does not use vec_expand_()