The gigue and the duo version of the courante in the seventh suite in G minor are of interest here. We'll start with the latter; here it is in the sequence of the suite. The solo version is at the top, the trio version at the bottom of the page. Note that a firmly descending melodic line in the cadence in the solo version (at "x") is counterpointed by a more complex and partly ascending line in the trio version (at "y").
Here is the page with the contre partie, which adopts the counterpointing line for its own closing cadence.
And here are two analyses of the ending (the notation is from an edition by Alfred Fuller). The original line (above) and its counterpoint (below) create a striking wedge figure (we will see this again in the gigue, below).
Asterisks show the complexity of treatments of scale degree ^6 (a reminder that the key signature is G minor/once-transposed Dorian). From this, the most plausible Urlinie for the contre partie rises from ^5 using the raised ^6 (E5), but this by no means erases the problem of Eb/E natural. A detailed analysis of the several structural levels would be quite an exercise.
Le Roux uses the same figure in the interior cadence to the opposite mode and also in the ending, shown here again as an analysis using the notation of Fuller's edition. Although the rising line is shown as the upper voice, performance options—which are so rich in Le Roux's volume—might place the descending line above if the second harpsichordist takes advantage of the direction "en haut si lon veut" (an octave higher ad lib) [see Pierre's Gouin's edition on IMSLP: link]
For a detailed table of contents to Le Roux's Pieces de Clavessin, go to the bottom of the IMSLP page: link.