AVL with correct height tracking and rebalancing