window: Minimize notebook tab flicker by querying before setting the text