Fix a possible crash in CompareDicts<T, TK> and CompareDicts<T, TG, TK>
Actually use SQLFileName from config as a global sql