I don't know where to start with this bug, so I'll just describe what happens.
I'm using the latest AS but it was like this a couple versions earlier too.
After I load byte code I get all sorts of errors.
Mainly I lose function pointers from the cache. I cache functions after loading like this:
cachedFuncs.func_onRender_CRules = mModule->GetFunctionByDecl( "void onRender( CRules@ this )" );
Now some functions lose the pointers and its just garbage. Not immediately but after some time before running the script.
But this is not the issue, its just an effect, cause if I dont use the cache there are some other random errors and crashes inside AS code.
I'm not 100% sure but I think the files I see breaking are the ones using an enum. It might be an AS bug not handling these enums properly:
this is the enum that is used in those files: