Fix #2450 (redraw top-scrolled tabs properly after resize)
Wrap yet another curses operation with a lock