Fix crash observed in the wild.