Fixes #21682 with a partial revert of #21411. The ~Ref() destructor (from 'scriptres') already takes care of freeing the 'script' resource.
Fixes #21682 with a partial revert of #21411. The ~Ref() destructor (from 'scriptres') already takes care of freeing the 'script' resource.