Complex sentence: Lock and weir were rebuilt in 1867 but the lock had to be rebuilt in stone in 1877.
Split into simpler sentences: Lock and weir were rebuilt in 1867. The lock had to be rebuilt in stone in 1877.