EZP-22564: implemented Criterion visiting in query context