If a commit shows up as the parent of multiple changes in a sizeable graph, we can re-traverse large sections of history, leading to exponential blowup of the list sizes, and some changes appearing multiple times. Fix this by pruning entries we've seen before. Bug: Issue 3727 Change-Id: I38513443e9903476bee664f361106d217e09ba92