Fix AIOOB in crash report stack trimming.