Improved support for multiple namespaces in one file