Further improvements to setVarId and function/array pointer detection in SymbolDatabase (#2872)