$assertoff is not working

I have a test in which I am binding assertions to multiple instances of a module. I would like to turn off assertions for some of the modules, and would like to use $assertoff to do so. However the assertions are not getting turned off! I have checked the instance names and $assertoff syntax, but the assertions are still not being turned off. The test compiles, runs, and fails due to the assertions failing. Can anyone help with this?

Here is an example which looks like my code. Please ignore any syntax errors as this is an example I coded up quickly.
my_test.svh


bind moduleC my_assertions #(0.00ps) iAssertions(.*);

class my_test;

  // Test stimulus

    virtual function void end_of_elaboration();
       $assertoff(0, my_top.iA.iB1)
    endfunction

endclass

my_assertions.sv


module my_assertions(
// some inputs
);

a_assertion_1: // some assertion

a_assertion_2: // another assertion
endmodule


module moduleA();

   moduleB iB1(.*);

   moduleB iB2(.*);

endmodule 

module moduleB();

  moduleC iC(.*);

endmodule


my_top.sv


module my_top();

module_A iA(.*);

initial begin
   run_test(); // This starts the test.
end

endmodule

In reply to jms8:

Are you sure that the assertions are firing for iB1 module instance? I believe that the assertions might be firing for iB2 instance. The code works gracefully for shutting down assertions in iB1 instance.

Here is the sample of your code at EDAPlayground.

Note that there might be some race condition for assertions firing at zero simulation time.