Cant Cut Instance [Family] out of wall

Hi All, I had built a script that allows the user to select a linked architectural door to be cut on the structural wall. In a test model, the script will work perfectly. However, when I bring it into the project model, the errors below pop up.

MicrosoftTeams-image (8)

MicrosoftTeams-image (9)

Test Model

DOWC_v3.dyn (135.4 KB)

Window-Square Opening_SPECIAL.rfa (368 KB)