A series of objects are following a spline with a certain separation from eachother, trying to seamlessly loop their motion

Right before setting SplineDistanceOfEnemyMesh, Mod the value with SplineLength. This will make the result relatively back to 0 if it becomes greater than SplineLength (due to the offset you are applying)