Even though the seventh degree of the scale was not used in the composition, the work must have revolved around G as the home base. Did the composition start and/or end on G? If so, that was why the F# was in the key signature even though there was no F# in the melody.