Where settlements with a view to preemption or homestead have been, or shall hereafter be made, before the survey of the lands in the field, which are found to have been made on sections sixteen or thirty-six, those sections shall be subject to the claims of such settlers; and if such sections or either of them have been or shall be granted, reserved, or pledged for the use of schools or colleges in the State in which they lie, other lands of equal acreage are hereby appropriated and granted, and may be selected, in accordance with the provisions of section
of this title, by said State, in lieu of such as may be thus taken by preemption or homestead settlers. And other lands of equal acreage are also hereby appropriated and granted and may be selected, in accordance with the provisions of section
of this title, by said State where sections sixteen or thirty-six are, before title could pass to the State, included within any Indian, military, or other reservation, or are, before title could pass to the State, otherwise disposed of by the United States: Provided, That the selection of any lands under this section in lieu of sections granted or reserved to a State shall be a waiver by the State of its right to the granted or reserved sections. And other lands of equal acreage are also appropriated and granted, and may be selected, in accordance with the provisions of section
of this title, by said State to compensate deficiencies for school purposes, where sections sixteen or thirty-six are fractional in quantity, or where one or both are wanting by reason of the township being fractional, or from any natural cause whatever. And it shall be the duty of the Secretary of the Interior, without awaiting the extension of the public surveys, to ascertain and determine, by protraction or otherwise, the number of townships that will be included within such Indian, military, or other reservations, and thereupon the State shall be entitled to select indemnity lands to the extent of section for section in lieu of sections therein which have been or shall be granted, reserved, or pledged; but such selections may not be made within the boundaries of said reservation: Provided, however, That nothing in this section contained shall prevent any State from awaiting the extinguishment of any such military, Indian, or other reservation and the restoration of the lands therein embraced to the public domain and then taking the sections sixteen and thirty-six in place therein.