We want the first PrevSuccessfullBuild, not the last one !

This is part of TRAC-3071

@delanne
Not **that** loop, the inner one. That's exactly what we're fixing there.