deep merge for define_namespace