[BUG 2996] Mixing of folder contents is now avoided. Original error would occur if a folder was a substring of another