Clear file selection when list is repopulated

When calling FileList.setFiles() the current selection needs to be
cleared.

Fixes #9111 

Please review @MorrisJobke @schiesbn @icewind1991