Fix PruneCruft array mutation bug

Looks like this was caused by f9cfe8db0c4ba99066e711fcfd1998f061adab39.

If you'd prefer a different style (prune after the loop or whatever), let me know.