If you take a close look at the orchestral score of the very beginning of the prelude to Wagner's Tristan und Isolde, you will notice that the English horn that plays that G-sharp in the third bar holds the note for the whole length of the measure. That is, the G-sharp is still sounding while the oboes have moved on to A for the last eighth-note of the measure. I have to say this dissonance is hard to hear in the orchestra. (It's eliminated in the piano score.) I wonder if Wagner was going after a pianistic pedal effect here. (The Schirmer edition of the piano reduction has no pedal markings.) Perhaps this suggests that pianists playing the prelude should use the pedal for this measure? (You can find a reproduction of the autograph score here, if you go to page 3.)