Question: what causes Error, `DEtools` does not evaluate to a module when only inside the debugger?

I have code which in module which does this

           DEtools:-kovacicsols(ode,func)

Where ode is some ode and func is y(x).  When I step in the debugger, I get exception at this. It says

       DBG> DEtools:-kovacicsols(ode,func)
       Error, `DEtools` does not evaluate to a module

Same exact code works OK from worksheet as expected.   SO for some reason, inside this module it does not see DEtools and I have no idea why.

Then I tried with :-  before DEtools, but this did not help. it gives

DBG> :-DEtools:-kovacicsols(ode,func)
Error, `table([(dperiodic_sols)=proc () `DEtools/init`() <> 0; `ODEtools/intfactor`(_passed); end etc...
` does not evaluate to a module

In a worksheet, it all works OK

ode:=diff(diff(y(x),x),x) = (-3/16/x^2-2/9/(x-1)^2+3/16/x/(x-1))*y(x);
func:=y(x);
DEtools:-kovacicsols(ode,func)

Gives the solution with no error.

Any suggestion what could be the cause and what to try next? I never seen anything like this. I am running this code using 

interface(warnlevel=4);
kernelopts('assertlevel'=2):

I am able to make a MWE. It seems this always happens in the debugger.  But if  I let it run, it works somehow. Only when I try to step into it, it gives error. Here is MWE

interface(warnlevel=4);
kernelopts('assertlevel'=2):
foo:=proc(ode,func)
   local result;
    DEBUG();   
    result:=DEtools:-kovacicsols(ode,func);
    return result;
  end proc;

And now

ode:=diff(diff(y(x),x),x) = (-3/16/x^2-2/9/(x-1)^2+3/16/x/(x-1))*y(x);
func:=y(x);
foo(ode,y(x))

Now in the debugger if I do DEtools:-kovacicsols(ode,func) or if I stepin the call, I get the error. But I hit the continue botton, I do not get the error and it gives solution. 

Why this happens?

Maple 2021.2 on windows 10

Please Wait...