Fix #297: fix isActiveTab to use global last active tab