Wrap Words iterator in a ByRef in to_string

`last` takes the iterator by value, so a mutable reference can't be used. I just wrapped it in a `ByRef` to make the change as non-invasive as possible. An alternative would be to make `to_string` take the iterator by value.