make a list of kwargs keys
make a list of kwargs keys

kwargs changes size in the for loop, so we need to instantiate a new list of
keys for the kwargs

Fixes #40682

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt