TileConditions: Fix array bounds checking.
Fix off-by-one errors in array bounds checks. Solves crashes seen when building with -D_GLIBCXX_ASSERTIONS.
Fix off-by-one errors in array bounds checks. Solves crashes seen when building with -D_GLIBCXX_ASSERTIONS.