GetDAG duplicate block fix.

GetDAG didnt properly handle DAGs with the same block appearing twice in its links, now it does.
The found parameter is to avoid returning an earlier duplicate block index, it checks to make sure it hasnt already gotten that node yet. Rewriting the function would remove the need for that, so ill probably do that. (once running `go test ./...` on master stops crashing my chromebook)