Added better virtual code generation method handling.