Fix root namespace determination.