query composition can't be trusted with DISTINCTs