Graph: nodes must be visible to be considered as selected.

The issue stems from cytoscapejs UI selecting hidden nodes when
selecting multiple nodes with a mouse-drawn rectangle.