If you have a global variable that is a private class, accessing members of the variable will work fine in dynamic mode, but fail in static typed mode. This is because in dynamic mode, the member access happens in a DynamicMethod, which does not perform accessibility checks. In static type mode however, the member access occurs in a DynamicAssembly which does do accessibility checking. So the JIT will fail to compile the method.
If you have a global variable that is a private class, accessing members of the variable will work fine in dynamic mode, but fail in static typed mode. This is because in dynamic mode, the member access happens in a DynamicMethod, which does not perform accessibility checks. In static type mode however, the member access occurs in a DynamicAssembly which does do accessibility checking. So the JIT will fail to compile the method.
See https://msdn.microsoft.com/en-us/library/9syytdak.aspx#Dynamic_Methods_Associated_with_Existing_Assemblies