GroupGraph: fix error in measuring risk.

Also, compute risk considering only inputs (except for computing the
flow centrality, which uses all actual output synapses).