Notwithstanding any provision of law to the contrary, nothing in this chapter shall abrogate any contractual provisions entered into between any railroad and any other party owning or operating an underground facility within the railroad’s right-of-way. For railroads regulated by the Federal Railroad Administration, sections 319.015 to 319.050 shall not include any underground facility owned or operated by a railroad on land which the railroad owns or any excavation done by a railroad when such excavation is done entirely on land which the railroad owns.