Alright, I've found a related PHP bug report. http://bugs.php.net/bug.php?id=44018
It seems that the default behavior is to return a SplFileInfo object. However, if 0 is passed as a flag then a RecursiveDirectoryIterator should be returned. However, I cannot seem to get that to work with 5.2.8. Testing previous versions, this option no longer works as of 5.2.6, but did in 5.2.5.
This seems like a bug to me, however that bug was marked as "Wont Fix". The default behavior should be RecursiveDirectoryIterator as there is a flag for CURRENT_AS_FILEINFO. Any thoughts on that?
In relation, I've found a workaround, use while(). That way I'm always working off of the $dir. I'd rather use foreach though..
$dir = new RecursiveDirectoryIterator('/path/to/dir');
while ($dir->valid()) {
print get_class($dir) . "\r\n";
$dir->next();
}