Fix the fates allocation optimization.

It failed to update a code path that reallocated, leading to a use
after free bug. Found by nwc10++ using ASAN.