Fix version stripping when filtering out needed pkg-configs that are provided from same (sub)package.