I think it can happen like this: King dies; if at war with Pope you are re-communicated/excommunicated following the Pope invading your province; you end up in any conflict with a faction (offensive/defensive/at sea) with any faction you have been warned to not attack.

I have seen it, but I have always received notice.