The issue was two fold.
First something sets the loop element tag and doesn't clear it before the UV code in question tries to use the tags.
Added a sanity clear to make sure that it operates on a clean tag state.
The next one was that the UV maps in question had quite a few points that had zero length UV loop edges.
This would lead to division by zero.