Do not use substatements in StmtContextUtils.getRootModuleQName()
Building effective model fails when a grouping in a submodule
is augmented from another submodule or the unique statement points
to a leaf in a grouping from another submodule.
Add test cases to reproduce the issues, which points to us accessing
substatements of submodules after all references have been resolved.
Since we already rely on SOURCE_LINKAGE being complete in this method
(e.g. ModuleCtxToModuleQName being populated), switch from using
statement enumeration to also using the BelongsToPrefixToModuleCtx
namespace, which resolved during that same phase.
JIRA: YANGTOOLS-1436
Change-Id: I71eb1122bf7c3820043a3197249a3b2fba6e9e8c
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
30f4e375338124bbb66d2bf1e1c65d0968fd1f0e)