Improve test suite, fix bug in Set.Global()