Deleting all faces (and connected edges) with a specific material. (Error: TypeError: reference to deleted Entity)

We seem to be forever explaining this fundamental rule …

…

So I opened an API Knowledge Issue in June last Jan …