Cleanup: Don't search stack for cycle elements twice.
Cleanup: Don't search stack for cycle elements twice.

The common case is that there is no cycle.  In that case,
CheckDependencyCycle() searched the stack for a dupe from the back,
wouldn't find one, and return false.

If there was a cycle, it would then search again from the front
(probably because the push_back() that used to be here would invalidate
the ri iterator).

Since the push_back() is gone, just search from the front once. No
intended behavior change.

ignatenkobrain/ninja,AoD314/ninja,juntalis/ninja,liukd/ninja,iwadon/ninja,ThiagoGarciaAlves/ninja,mgaunard/ninja,maruel/ninja,juntalis/ninja,iwadon/ninja,ignatenkobrain/ninja,mydongistiny/ninja,atetubou/ninja,martine/ninja,hnney/ninja,autopulated/ninja,sxlin/dist_ninja,Maratyszcza/ninja-pypi,Qix-/ninja,colincross/ninja,ilor/ninja,kissthink/ninja,fuchsia-mirror/third_party-ninja,ninja-build/ninja,jendrikillner/ninja,sgraham/ninja,ninja-build/ninja,atetubou/ninja,moroten/ninja,vvvrrooomm/ninja,nicolasdespres/ninja,ThiagoGarciaAlves/ninja,nico/ninja,iwadon/ninja,dorgonman/ninja,maruel/ninja,kissthink/ninja,jimon/ninja,Maratyszcza/ninja-pypi,nafest/ninja,nafest/ninja,Ju2ender/ninja,automeka/ninja,juntalis/ninja,colincross/ninja,ignatenkobrain/ninja,AoD314/ninja,lizh06/ninja,jimon/ninja,bmeurer/ninja,fuchsia-mirror/third_party-ninja,lizh06/ninja,Qix-/ninja,martine/ninja,tfarina/ninja,ThiagoGarciaAlves/ninja,nicolasdespres/ninja,bmeurer/ninja,bradking/ninja,tfarina/ninja,ThiagoGarciaAlves/ninja,maruel/ninja,mydongistiny/ninja,liukd/ninja,hnney/ninja,autopulated/ninja,autopulated/ninja,bmeurer/ninja,synaptek/ninja,ignatenkobrain/ninja,ilor/ninja,sxlin/dist_ninja,vvvrrooomm/ninja,nicolasdespres/ninja,kissthink/ninja,ninja-build/ninja,mohamed/ninja,jendrikillner/ninja,sxlin/dist_ninja,mohamed/ninja,Ju2ender/ninja,liukd/ninja,AoD314/ninja,automeka/ninja,ilor/ninja,mydongistiny/ninja,colincross/ninja,Qix-/ninja,synaptek/ninja,mydongistiny/ninja,jendrikillner/ninja,mgaunard/ninja,fuchsia-mirror/third_party-ninja,tfarina/ninja,sxlin/dist_ninja,jimon/ninja,mgaunard/ninja,atetubou/ninja,sgraham/ninja,nicolasdespres/ninja,vvvrrooomm/ninja,nafest/ninja,ndsol/subninja,ndsol/subninja,kissthink/ninja,lizh06/ninja,sxlin/dist_ninja,mohamed/ninja,vvvrrooomm/ninja,maruel/ninja,sxlin/dist_ninja,martine/ninja,Ju2ender/ninja,bradking/ninja,nico/ninja,dorgonman/ninja,autopulated/ninja,dorgonman/ninja,ndsol/subninja,bradking/ninja,ninja-build/ninja,sxlin/dist_ninja,fuchsia-mirror/third_party-ninja,Maratyszcza/ninja-pypi,jendrikillner/ninja,colincross/ninja,automeka/ninja,automeka/ninja,sgraham/ninja,nafest/ninja,mgaunard/ninja,moroten/ninja,hnney/ninja,juntalis/ninja,atetubou/ninja,tfarina/ninja,liukd/ninja,lizh06/ninja,ndsol/subninja,ilor/ninja,jimon/ninja,martine/ninja,hnney/ninja,iwadon/ninja,nico/ninja,synaptek/ninja,nico/ninja,moroten/ninja,synaptek/ninja,Qix-/ninja,bmeurer/ninja,Maratyszcza/ninja-pypi,mohamed/ninja,AoD314/ninja,moroten/ninja,dorgonman/ninja,sgraham/ninja,Ju2ender/ninja,bradking/ninja