Move set_flood, in preparation for the next commit. No semantic change.