Fix display of folder names in filter editor

Fixes #2569