Issue #6674 done. Queries, filters and sorting now fixed