Without being able to see all the code, my guess is that one of the UDFs sets the "Explicit" flag, then resets it when it exits.

When there is an unexpected error condition the UDF exits early so never sets "Explicit" back to it's correct value.

When you fixed the error condition by reinstalling WSH the UDF worked correctly, setting "Explicit" on and off so that the rest of your script works again.

This is why I said that any SetOption() changes made in a UDF must be reset in all circumstances, including abnormal exits.