Fix restarting builds

Failed paths were not cleared because the $builds query becomes empty as soon as the "finished" flag has been cleared. So this needs to be done last.

Created by  Eelco Dolstra  on October 28, 2015
YWS3TOWASVJXM24KZFD7FQSZJ2RMASTHAYM52OAJSQYEJR44KNBAC
Change contents