I just played around a bit:
Made a closed polyline, failure.
Exploded that polyline, selected all elements, success.
Made a polyline, starting and ending at normal straight lines so a closed contour is shaped. Exploded polyline part. Selected whole shape, failure.
Where exploded polyline meets straight lines, at both ends, did "trim two" for last ex polyline sement and adjacant straight line. Success.