Correct a bug introduced in ScriptHelper.cs

Commit da2553b7d33caa989e895a9ebfd7be1204f43f99 introduced a bug where
the non-Reslashed name is used in some cases. Not sure if it's actually
a problem, but different than before. Fix that.