[xbuild] ImportCollections.TryGetImport and other fixes