18 USC, Chapter 44, Section 926 is not any of the 50 state's law, it is federal law and has been shown in this very thread to be a very short federal law as compared to most federal laws. Illinois even had a state supreme court case, some time ago, where they overturned a arrest/conviction, I think, for a out-of-stater who had been caught with a gun, transiting, IAW 18 USC, Chapter 44, Section 926. The charge was "no FOID" card as required by Illinois state law for Illinois residents. The court ruled that a non-Illinois resident is not required to have a FOID to transit the state of Illinois.....18 USC, Chapter 44, Section 926 applies.
There should be little effort to get a judge to tell a cop, in Illinois, you should have know this law for a out-of-stater encounter.