201: Operation is disallowed in this session Module

An agent that was working fine in version 7 stopped working after upgrading to version 8 with the following error:201: Operation is disallowed in this session

Module…

The runtime security level for the agent is set to “2. Allow restricted operations”.

The error happens within a Script Library that is used by the agent. This library in turn uses a dll to provide some functionality.

Any ideas?