Fix a potential out-of-bounds read.

It's quite unlikely that this bug would really have been triggered but avoiding random literal constant as bound is good.