[panels] Check for negative panel number.