pushAllNodes doesn't work when the graph is cyclic. Need to find a way to handle paired nodes (eg. SUBCLASS_OF and SUPERCLASS_OF).