If you have +12V at the lamp socket with the pedal pressed yet fitting a working bulb 'kills' the voltage then there might be a high resistance somewhere. With no current flowing, the volts just 'floats' but trying to pull the correct current with a connected bulb will mean that the volts are all dropped at the high resistance and not available at the bulb filament.
This could be any connections along the green wire from the start of this IGN switched wire to the brake-switch, at the brake-switch itself or on the way to the rear lamp socket, or the earth on that socket. If you temporarily bypass sections of this circuit using a length of wire to bridge, you should be able to identify the dodgy section.