[Orc] Replace lambda with a helper method.