fix(rust): Use after free in file cache (#28236)