DNN-5049 Made sure resource strings are first checked before adding them...

... to script.