If the third section is shown inside the existing window remember it as a zero window extension or third section show. That way it will hide correctly when it is closed by X button. Partially fixes #4091.