Issue 7340: Undefined context if closed tab is reopened