Correctly ignore functions in namespaces.
This prevents types used by functions in namespaces not in the class list from being added to the type list.