SSP-2363 Fixed through code. distinct not working with projection