A joke lost for centuries was found during restoration work to one of the buildings. Maisy Walker reports.