A judge has ruled that national firm Irwin Mitchell cannot recover its costs shortfall in a multi-million-pound case from the claimant’s damages.