This is not a problem for negated paths that do not involve the ancestor axis because such paths cannot escape the scoped subtree.
the effects of negation and scoping on the ancestor axis give the following lemma.