Fix up CTEs.