[opwig] Updated MDScanner to keep a stack of Scopes, instead of just the current one (improvement/bugfix);