and using a range check manually before an index will normally optimize the internal bounds check away