Fixing FindSymId function to recognize types and correct scoping.