Fix enable/disable classification error
Rewrite query-visibility to also use the correct field processing order;
share some duplicate code between bug-visibility and query-visibility.