Sometimes when joining two or more strokes ends that were not close would be merge.
This was caused by using `dst_drawing` instead of `tmp_drawing`. The function
`compute_closest_range_to` would try to the the first and last point by using the drawing
that the `PointsRange` would have a pointer to.
But the `working_range` would point to `dst_drawing` with would have the `CurveGeometry`
of `dst_curves` instead of `tmp_curves`
This would lead to the wrong first and last points being used for deciding which end
to connect.
This problem could also lead to a crash by trying to get a curve that does not exist.
Pull Request: https://projects.blender.org/blender/blender/pulls/144668