On homonculus's point I disagree as my understading is that policy wording is contractual in nature and you cannot contract out of the law
I am not a lawyer and have never claimed on an aviation policy
but sadly I do have to argue the t@@@ daily with insurers. You are correct in that normally you must be legal in all matters and any policy even eg house contents can be nullified if you are behaving outside the law. However that does not stop an insurer doing what they want ie the opposite and insuring illegal acts. It seems from my earlier post that the insurer may not have totally understood the situation, which raises the additional risk (to policy holder, not insurer of course) that if the insurer can claim in any way you might have misled, not totally informed, or otherwise said anything in a way they can even claim not to have understood, then again you are not insured. I always assume an insurer will not pay out ever, and then on occasions I have a happy surprise.
None of which answers OP's question