bugs.core_3173_test. Empty result when select from SP that contains two CTE (second of them with GROUP BY clause) and INNER join