See. The courts have to invalidate Obama, otherwise he’s subject to the UCMJ.
A court martial is a Court, just as much as any federal district court. Each service has a Court of Criminal Appeals, and then there is the US Court of Appeals for the Armed Forces and finally cases may be appealed to the Supreme Court of the US. So actually there exists one more opportunity for appeal in the military system than in the federal civilian system. (district court, Circuit Court of appeals, Supreme Court).
The Court, which is the jury, could find him not guilty by reason of the order not being lawful. It could be that the convening authority would choose not to appeal, although it would be *highly* unlikely. If he loses, say by the military judge instructing the Court that Obama is eligible or that that it's only the order, not the order giver, that must be lawful. Either way, then the Lt.Col.'s appeal would be on the basis that the trial judge ruled incorrectly.
Certainly a finding of not guilty by reason of unlawful order would certainly be more immediately "interesting" , but either outcome at trial could lead to the same result.