Validate unique names in namespaces, fixed #383, fixed #379.