TestSubQueries accounting for DISTINCT regressions