Fixed bug related to node depth

GNodes can be visited multiple times during conversion from node,
and each time their depth is set based on the path that was taken
to reach them. This was changed so that the maximum depth would be
taken, so that children are drawn closest to their youngest parent.
Since the children drawing algorithm expects them to be drawn close
to their youngest parent, this fixes a bug that caused overlapping
nodes to be drawn