Bug 1083373 part 2: Assert that array index is in-bounds, and cast it from char to size_t to fix clang warning. r=edwin