It shall be lawful for the company to deviate from the line delineated on the plans so deposited, provided that no such deviation shall extend to a greater distance than the limits of deviation delineated upon the said plans, nor to a greater extent in passing through a town, village, or lands continuously built upon than ten yards, or elsewhere to a greater extent than one hundred yards from the said line, and that the railway by means of such deviation be not made to extend into the lands of any person, whether owner, lessee, or occupier, whose name is not mentioned in the books of reference, without the previous consent in writing of such person, unless the name of such person shall have been omitted by mistake, and the fact that such omission proceeded from mistake shall have been certified in manner herein or in the special Act provided for in cases of unintentional errors in the said books of reference.