Fix bug #64555: foreach no longer copies keys if they are interned