Gtnportal 3510.2

GTNPORTAL-3510 Possible memory leaks, consistency issues and concurrency issues in ScriptGraph
I think this method was reviewed before, so, I'm fine with it the way it is (perhaps the comment about the log would be worth a couple of seconds of thinking, though).