layout/force: handle case of zero weight on both linked nodes

In this case treat both nodes as having an equal weight of 1
(arbitrary).

This fixes a divide by zero error otherwise.

I've included a signed-off (saying that I'm the author of the code). I didn't sign the contributor agreement since this falls under the trivial rule. Correct me if I am mistaken.