Fixed #22434 -- Retain ordering to be cleared on custom managersubqueries

Thanks maciej.pawlisz for the report.  Used the Query.can_filter() for
checking if there is a sliced, and if can_filter() then we can also
clear the ordering