Pull curve to polysurface

The problem I’ve found is that the closest of the projection isn’t consistently the 0 or 1 index. This image shows what I tried to do: pulling all those lines onto this polysurface

This script below will show you the problem I experience. I suppose I can build in a distance condition but shouldn’t the 0 index always be the closer projection?
forum_project.gh (20.4 KB)