Fixed #6056 - properly detect member functions in setVarId()