(3) No sum shall be payable by an insurer under subsection (1), if, in an action commenced before, or within 3 months after, the commencement of the proceedings in which the judgement was given, the insurer has obtained a declaration that, apart from any provision contained in the policy, the insurer is entitled to avoid the policy on the ground that it was obtained by the non-disclosure of a material fact, or by a representation of fact which was false in some material particular, or, if the insurer has avoided the policy on that ground, that the insurer was entitled to do so apart from any provision contained in the policy.