Add utility to compute basic trace statistics
Prevent infinite loop in graph processing

Add split node only if not already visited.