Hi Christoph,
I have reproduced a similar problem on Windows 7. What I have got is a BEX64 / StackHash problem. This is related to DEP (Data Execution Prevention), and is a ** Windows problem **, not a PixInsight problem, although obviously you as a user won't agree with this view. I can guarantee you that neither PixInsight nor any of the modules executed by PixInsight attempt to execute any code in a data segment of memory.
Fortunately, this only happens with the DarkStructureEnhance script. I say 'fortunately' because this script is a very special case. It depends on some very old tools that have been deprecated long time ago (in particular, the ATrousWaveletTransformV1 tool). Due to these dependencies, and to the fact that it has not been updated for years, this script is actually 'abandonware' in the PixInsight platform. We may consider removing it from future PI releases.
Nevertheless, the script works without problems on Linux and Mac OS X. I currently have no workaround or solution for Windows, since the BEX64/StackHash issue is very difficult to fix for a 64-bit application (because Windows does not allow to change DEP settings for x64 applications). I'll keep investigating this issue, but for now, if you really need to apply the DSE script, my advice is to use Linux or Mac OS X, if possible.
Sorry for the inconvenience.