Put injectContext() and closeInjectedContext() closely around openDeclaration()
openDeclaration() is the only call that needs the injected context, and this avoids bugs if openContext() is called in an injected context. For instance, QML component subclasses were broken because a context was injected and not closed before openContext() was called. The sub-context had therefore the wrong parent context.
Showing with 6 additions and 4 deletions