fix vectorize for pass-by-ref types