Fix panelHeight reset before computing collapsed height.