graph: use truncindex consistently to iterate graph entries Upstream-commit: a81dcaef93889a2a62b85a5040fb6b5d04633396 Component: engine