Fix Remove action on topLevelFile.

Fixes #2347, #2384 
@ussuri 
I think it doesn't have to, since we're indeed accessing it only via the dialog's element. But uniqueness doesn't hurt.