gdb: Improve cache matching criteria for the bfd cache.