Made changes that fix the issue that occurs when the simulink file name is changed and the rfdc mask does not update correctly. This fix also applies to creating a copy of an rfdc block. With these changes, the rfdc mask will automatically update its name for the new copy.
The fix involved making another state variable that the function "same_state" can use to check against the current block's name and the module name. With this additional check in place, it allows the block to update the name of its internal blocks to match the new file name correctly.
Testing included making a new simulink project, making an rfdc block, saving, then closing the file. Then I changed the name of the simulink file in the matlab file tree. Then I reopened the file and checked inside the rfdc block to see if the internal block names matched the new file name.
I also tested the copy/paste function by taking the rfdc block, copying it, and then pasting it into the same simulink project. Then I checked inside the rfdc block and made sure that the internal block names had the correct name.