Be more careful about updating the failed-modules set