Tweaked EdgesHelper code. See #5490.