Trails seems to create ghost entries in Health App

During the span of a week, I recorded multiple bike trips. I paused some, saved and re-recorded some, started new segments. All fine so far. The resulting recordings that appear in the Health/Activitiy App are correct and add up to the correct amount (by hand).
However, when I use Shortcuts to accumulate all bike trips from one day, the result is off, adding more than 20 % to the actual kilometer amount. I assume there are invisible residues of preliminary Health logs, as they are added when hitting the Pause Button, then removed upon continuation of a segment.
Screenshots, screencasts and data available upon request.