GatherDeclarations impl.