If you look at the output of the Cap component, with Tree/List Viewer by @Joseph_Oster (thanks for this great tool Joseph, I use it frequently) you will see that the last branch is a duplicate of the first branch.
Culling the last branch produces a closed brep from the python script component.
The grasshopper component probably checks for problems like this (part of the reason it’s slower?).
perf_pipe_re.gh (23.4 KB)
Here’s a link to the Tree/List viewer from @Joseph_Oster if you don’t have it:
-Kevin

