User Answers

You could use  the %SYS.GlobalQuery NamespaceList query instead - there is a parameter to include/exclude system globals.

Take a look at the Config.Namespaces class in the %SYS namespace.

It looks like the CopyMaps method should do the job.