Andy,
I acctualy don't know this model Roland D5, but most of recent keyboards, including Roland and Ensoniq uses a micro processor to scan the keyboard.
This process uses a diode matrix connected to the keyboard to lessen the number of inputs and usually have 12 rows representing the keys from A to G, including half tones, and a number of columns representing the octaves, which changes according with the model of keyboard (the number of octaves on it). Each row and column are connected to the micro processor to identify the note(s) pressed. The scan rate is fast enough to detect a chord in different time identifying each note individualy.
So, if you press a C3, for example, the output of the matrix will be row "C", colum 3 and the note will be identified.
As you noted that the synth still sounds for that notes receiving MIDI commands, I can conclude that your sound chip is perfect and the probably cause of the malfunction is just one burned diode (or cold soldering) of that matrix, that represents one octave.
Are the missing keys on the edge of the keyboard? This would explains easily why you have only 6 missing notes and not a complete octave, cause the notes belongs to a not completed octave. The other alternative may be that Roland use one diode for each half octave, but I don't believe so.
Good news! This electrical problem is very simple to be detected by a conventional multimeter and be replaced or resoldered by any qualified eletronical technician.
Regards and good luck.
Fernando