Fixed resolving the same file multiple times when selecting directories