cmGlobalGenerator: Fix CheckTargetsForMissingSources after refactoring
Refactoring in !2901 (merged) accidentally changed a loop condition in this method from "keep iterating if srcs.empty()" to "stop iterating if srcs.empty()". Switch it back.
The bug could only manifest in very subtle conditions in a multi-config generator. Add one such case to the test suite.
Fixes: #20706 (closed)