Fixed qs.values() regression when used in subquery