Use of nested foreach with ArrayObject.