Tentative fix for global-buffer-overflow caused by r188426. Found by AddressSanitizer