In !3402 (merged) the new member cmCustomCommandGenerator::EmulatorsWithArguments
was not initialized to the proper size. Fix this and add a test case covering the crash that could occur with multiple commands where an emulator appears only in a later command.
Fixes: #19500 (closed)
Topic-rename: fix-emulator-arguments