Add DISTINCT_ROOT_TRANSFORMER to queries