`filter` returns its input when it has no rows or no columns (closes #782).
test for #782