Better pruning of thin walls to avoid unwanted extra extrusions. Includes regression test. #1794