flatten arguments to singleton_packages()

I'm not sure if this was caused by my environment or if others have had this problem, but I found that ```function_singleton_packages``` would sometimes be called with just an empty array as an argument (with ```Class[Singleton]``` as the scope), and that would result in a ```Package[singleton_package_]``` resource being declared, which is generally not a good thing.

At any rate, it doesn't make sense for the arguments to ```singleton_packages``` to be anything other than strings, so flattening it first should make it more robust.