Avoid tab height resizing infinite loop

Resizing logic triggered another resize event, which triggered more resizing, etc.