Hopefully fixed the second invalid pointer detection that could often…

… occur in the script manager.
For that, I removed an old allacrostian temp statement, fixing the check
about opening the same file multiple times.
This should permit me to disclose the bug origin in a easier way.
I also added a bit of useful log in case someone else got the issue.