Fix dyad census instability, sometimes incorrect results were reported. Fixes issue #496.