Fix for double free in RE cache unit test.