While the other answers (referring to scordatura) are obviously valid, I'd like to add a small insight about early key signatures.
Using single sharp/flat symbols that are implicitly valid for all octaves is a convention that became a standard only after the 17th century, also coinciding with the gradual adoption of the tonality system we currently use.
Until the first half of the 18th century, few keys (and related signatures) were actually used, rarely going beyond 2 or 3 symbols. Therefore it was common to indicate "all" sharps or flats for the instrument/voice range.
See the following example taken from the related Wikipedia article:
Also, early key signatures were gradually introduced, and initially with just one flat (no sharp based keys), and even when more "keys" were introduced, there were still a few actual keys commonly in use.
The common flat minor keys (D, G and C) were also often notated with one flat less, being it the sixth grade, therefore actually making them using the Dorian mode, which was traditionally considered the "first mode".
Take this excerpt from the chorale "Die güldne Sonne" (BWV 451), which is clearly in C minor, but is missing the A flat in the signature:
Similarly, major keys (G, D, A) were sometimes omitting the last sharp, the leading tone.
Initial flat keys also used the signature for the lower voice only ("partial signature"), therefore mostly using the Lydian mode except for the lower part: there were combinations of B♮ and B♭ (from top to bottom), caused by contrapuntal polytonality in which the melody tends towards the B-natural (Lydian) tonal realm, while the lower parts tends toward the B-flat one (as reported from the Harvard Dictionary of Music).
This may seem the case of the example at hand, due to the lower C (the leading tone, and last sharp in the D key), but it's just an interesting coincidence caused by the specific scordatura combination used there and the relation between the tuning of the strings (one fourth and two fifths).