I have another subtle bug somewhere, perhaps, but this will guard against it.