Merge "Various fixes in setting globals in a script group"