Remove a duplicate lookup in the hotpath of MGraph

The set membership test and find can be combined in one lookup call.
Merge pull request #11 from maertsen/Improve_MGraph_query_by_removing_duplicate_lookup

Remove a duplicate lookup in the hotpath of MGraph