Parties Dialog behaviour

When using the Parties dialog, clicking on any given party will open up its Party dialog. Clicking a different party will replace that window with the new party. If you click the same party again, you deselect that party, but the Party Dialog remains open.

I think deselecting a party in the Parties dialog should close the associated Party dialog.