Fix no buid

Should fix crash. See commit comments.

Originally reported at:
https://bugs.debian.org/730756