When calling getNamespaceDefinition on a SourceFileNode an exception is thrown:
Invalid tree - SourceFileNode must always exist at root of tree.
The function tries to fallback to the SouceFileNode from any child node type, but fails when the node is itself a SourceFileNode.