Rebalanced energy calculation. Now detecting if a node is on an unrelated link.