The same duplicate build avoidance as in Doit.