fixed TW-34908 - re-implemented packages query builder for v2.8 (used IPackageName.Id property instead of IPackageMetadata.Id)