Conditional instantiation of components

I am developing a Tb where instantiation of some components are conditional to test under run

For one test (Lets call it error injection test), I have to instantiate an agent to program my DUT

This is the conditional code in env component for the instantiation

 if(uvm_config_db#(configParam) :: get(this, "", "config_obj", config_obj)) begin
    if(config_obj.error_injection_test == 1 || config_obj.self_check_test == 1)
      l_agent = lbc_agent::type_id::create("lbc_agent",this);
  end

This agent has a sequencer, a driver and a monitor. Do I have to copy this conditional code during the construction of the same?