Fixed crash in iterator Clone(), added test