Fix the error occured when predicate has the same name as the sort