main/quagga: apply fix to rare bgpd crash during route selection

patch picked up from Cumulus Network's quagga patch queue