from netbsd: more of PR 1931.  Fix code that's not compiled unless DEBUG.
from netbsd: more of PR 1931.  Fix code that's not compiled unless DEBUG.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars