When any person, company, association, or corporation, against whom any tax has been assessed and levied by the director of revenue and held invalid or illegal, shall have paid the same voluntarily or shall otherwise waive such invalidity and illegality, the director shall accept such tax in lieu of the tax to be raised by the reassessment and relevy provided for in section 439.1.