Townsite entries may be made by incorporated towns or cities on the mineral lands of the United States, but no title shall be acquired by such towns or cities to any vein of gold, silver, cinnabar, copper or lead, or to any valid mining claim or possession held under existing law. When mineral veins are possessed within the limits of an incorporated town or city, and such possession is recognized by local authority or by the laws of the United States, the title to town lots shall be subject to such recognized possession and the necessary use thereof and when entry has been made or patent issued for such townsites to such incorporated town or city, the possessor of such mineral vein may enter and receive patent for such mineral vein, and the surface ground appertaining thereto: PROVIDED, That no entry shall be made by such mineral vein claimant for surface ground where the owner or occupier of the surface ground shall have had possession of the same before the inception of the title of the mineral vein applicant.