The purpose of this whole new block of code seems to be there only in the "cancel rename case" and seems to be there to restore the file actions in their original state. I'd prefer not having that big block here as it somehow duplicates the logic from FileActions.display().

I'll see whether there is an easier way.