compiler: don't look at unit and namespace symbols from other units while searching for a type (issue #0025054)

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@25536 3ad0048d-3df7-0310-abae-a5850022a9f2