Whenever a minimum population or valuation within a township is a prerequisite for the residents thereof to obtain any permit or license, and the township once has the required population or valuation, heretofore or hereafter, the residents of the township shall continue to be eligible for the permit or license notwithstanding the township thereafter loses the required population or valuation because of annexation by a city of the first or second class.