Fix a reading of invalid memory error introduced by 3f3092b4776a554abcf13f698a488adf749bba57.