sorry... i don't have a clue how to fix that efficiently but I'll take a look. I can understand why the ways might be out of order, but based on a visual inspection of https://osm.org/relation/14309095 and https://osm.org/relation/2666822, i don't see any gaps...