Fix regression in test/install/package configuration selection
In !4957 (merged), calls to GetGeneratorConfigs that pass OnlyMultiConfig only want to get any
configurations listed if the generator is multi-config. Fix the
implementation to actually do that.
Fixes: #21316 (closed)
Backport: release