Barrister wins appeal over wasted costs order