Don't allow creating empty file filters

For #7961 @bchintx @RaymondLim

This also fixes #7960.