Was Caerphilly castle ever defeated?