An insurer defending a policyholder in litigation must also reimburse the insured party's coverage action costs if the insurer loses a legal challenge to its indemnity obligation, a judge has ruled.