diff --git a/Engine/Helper.cs b/Engine/Helper.cs index 28e4d49a0..7680befbd 100644 --- a/Engine/Helper.cs +++ b/Engine/Helper.cs @@ -65,7 +65,10 @@ internal set { lock (syncRoot) { - instance = value; + if (instance == null) + { + instance = value; + } } } } @@ -147,7 +150,10 @@ public void Initialize() KeywordBlockDictionary = new Dictionary>>(StringComparer.OrdinalIgnoreCase); VariableAnalysisDictionary = new Dictionary(); ruleArguments = new Dictionary>(StringComparer.OrdinalIgnoreCase); - commandInfoCache = new Dictionary(StringComparer.OrdinalIgnoreCase); + if (commandInfoCache == null) + { + commandInfoCache = new Dictionary(StringComparer.OrdinalIgnoreCase); + } IEnumerable aliases = this.invokeCommand.GetCommands("*", CommandTypes.Alias, true);