function id changes for multiple threads; marshal func_code instead