Fix code_gen to prevent calls to 'hook_XXX' functions from being generated (resulting code will not build).