If you have a local variable being used inside a collapsed graph inside a function, and you rename the function, it fails to compile until you place a new get/set of the variable in the collapsed graph.
Thank you for the report. I was able to reproduce this in 4.16 but this is now working correctly in our latest internal build. You will see this fixed in a future engine version.
To fix this without adding a new version of the variable, you can go into the collapsed graph > Right-click on the local variable > Choose Replace Variable.
fwiw, in 4.27, it doesn’t look like this problem was ever fixed. Also taking a pile of nodes inside a function that refer to local variables, and using the Collapse option on them results in the exact same thing, and you have to go through each of the references and replace them and refresh the nodes.