Fix a crash (doh)

If we want to set the deleted mcache pointer to null, we need to
iterate by reference.