Since model.frames is resized (maybe moved ?), the reference parent_frame is no longer valid. Copying it before this change prevent the bug