Improve ArrayObject::toArray: Also convert sub elements.