Don't know whats wrong. Worked fine for me.
U could change the ....Formula = 2 to ...FormulaU = 2
It may be, that some of the lines are guarded. Same for ResultU, which can be used instead of Result.
Like you said, you have many connectors, but not all connectors are badly connected. My script shall help in so far, as to show the (hopefully few) lines, that are badly connected.
In your example have been only black connectors, but in your .png's for wapperdude, there are some mysterious blue, green, red (dotted) lines, too.
It may be, that those are the one's the code is not working with.
If so, the code must be altered, to include a test, if a certain line is one of those, and in that case to ignore that line...
Jumpy