Skip over zero-length subpaths.  Calculate for each subpath and then "or" those results together.