Add guards to the graph traverser to avoid re-traversing the same entity multiple times. This avoids infinitite loops when graphs have loops