document-panel: always selecting the active tab

When opening multiple files ( with command-line or with
mutli-selection in open files dialog ), the wrong row is selected.