For smart and web clients, the context is the entire solution…all modules. Headless client the context is only the module (and modules included in it) that you specify in the session:
HeadlessClientFactory.createSessionBean(request,"myServoyModule")
I suspect the scope your are calling is in a module outside the context of your headless client.