assure p_index == pane_index