Fix bug with scope lookup after symboltable