The problem is caused by inaccuracies in the source dxf file. There are lines with almost zero length, which are redundant. When you include them in the selection, the error message appears.
After removing the error, there is no longer a problem creating and using the cross-section.