Use the correct variable, also limit the scope to bfd
PR: 242109 Reported by: jhb Sponsored by: The FreeBSD Foundation