Bugfix: thin walls forming a closed loop had overlapping segments at their endpoints. #1948 #1875