A bit of defensive coding to work around haku's latest problem in haku/Onosendai#87.