Where, under sections
934 to
939 of this title, or under special Acts of Congress, or under the laws of the former Territories of Oklahoma and Arizona, railroads have been constructed and were on June 26, 1906, in operation in Oklahoma or Arizona which passed through any of the lands theretofore reserved for said Territories, such lands shall be disposed of subject to such railroad right or easement, but only to the extent of the right of way conferred by the said sections for such railroad purposes.