Lords overturns appeal ruling on wasted costs