Merge "Fix unsigned integer overflow of i, which gives SIGABRT"