Each level of 'scopes' represents a deeper scope, e.g. in fullScope="scopeA::scopeB",  scopes[0]="scopeA", scopes[1]="scopeB" etc.
But I think you're effectively flattening them when you look up them up, i.e. you're looking each up in isolation in m_managedFileScopesMap ..

That's not going to be correct, for example if someone has defined a top level "scopeB" as well as a "scopeB" under "scopeA" as in the above example.

I think your map needs to contain the root qualified managed scopes, so that you're doing:
1) m_managedFileScopesMap.find("scopeA")
2) m_managedFileScopesMap.find("scopeA::scopeB")
etc.