(b) Subject matter jurisdiction is established if a nexus exists between an offense, either military or nonmilitary, and the state military force. Courts-martial have primary jurisdiction of military offenses as defined in this article. A proper civilian court has primary jurisdiction of a nonmilitary offense when an act or omission violates both this article and local criminal law, foreign or domestic. In such a case, a court-martial may be initiated only after the civilian authority has declined to prosecute or dismissed the charge, provided jeopardy has not attached. Jurisdiction over attempted crimes, conspiracy crimes, solicitation, and accessory crimes must be determined by the underlying offense.