Iam not able able to makeout the issue because of set_inst_name function

Hi
Iam getting below error from my monitor.In that monitor i have instance name as below

ui_transfer_cg.set_inst_name(“ui_transfer_cg_inst”);

** Error: (vsim-8828) /group/fsgv/bharath/QDR_CO_0608/verif/xiphy_20t_n1_live/qdr2plus_verif/sv/ui_agent/ui_monitor.sv(530): Assignment causes covergroup instances declared at /group/fsgv/bharath/QDR_CO_0608/verif/xiphy_20t_n1_live/qdr2plus_verif/sv/ui_agent/ui_monitor.sv(434) and /group/fsgv/bharath/QDR_CO_0608/verif/xiphy_20t_n1_live/qdr2plus_verif/sv/ui_agent/ui_monitor.sv(434) to have duplicate name: ‘ui_transfer_cg_inst’

Any help will be helping me to understand the usage of set_inst_name issue.

When i moved set_inst_name function calling into build phase the issue got fixed.