The dictionary (first arg) of Pdict cannot be a Pattern (and Pkey is one). To switch that first arg of Pdict you need to wrap it in an Plazy, see e.g. discussions here for replacing Pseq lists and/or reps. (And then you have to decide/think when the replacement needs to happen in your use case.)
1 Like