An error in a shared Groovy script with a class defined in the script will result in the same errors in all the other scripts with classed defined.
Create a shared script with the name "ABC"
Now create another Shared Groovy script with name "DEF"
Though the error is on the first shared Groovy script you will see the same error in all other scripts with a class defined. And hence when you execute the scripts from other the correct Shared Groovy scripts they fail.