Fix backpropagation error in Kahn mode
Fix backpropagation error in Kahn mode

If there are duplicates in successors, topSortAcyclic may produce
duplicated nodes that end up duplicated backpropagation.

ekmett/ad,ekmett/ad