(#13349) Fix incorrect scope behavior
This commit resolves an error with class inclusion, via a resource
rather than the include statement, where if the class was a top-level
class, the class name would get resolved twice: once for adding the
resource (which happened correctly) and again when evaluating the class
(which would incorrectly re-check all the namespaces though with the ::
stripped off) finding the nested version.
Prior to this commit the following manifest would generate both notify
messages. After this commit, the manifest only generates the top-level
notify messages.
class { 'foo::test': }
class foo::test {
class { '::bar::baz': }
}
class bar::baz {
notify { 'good!': }
}
class foo::bar::baz {
notify { 'bad!': }
}