Revert "Simplify ScriptRegistry::newScript function -- stash later"

This part is required in case of multiple registered script with one variable.
Elsewise the second registering will overwrite the stuff of the first and hence the first would not be registered..

This reverts commit 15fa56901fff74d6f165f5f72ea95077b9fce371.