Correct me if I'm wrong, but it seems that when viewing a folder in flat mode (with corresponding subfolders and documents displayed), the filter box won't work on the subfolder/subdocuments. It only works on those files physically in the current folder.
Is this by design, bug, or possible feature request?
The way you describe it, the only way that a file would still be visible after applying a filter would be if the same string was in both the sub-directory and the file. Naturally, that's not always the case.