The current implementation of SkipDotsRecursiveDirectoryIterator doesn't work on systems where dotfiles are included in the list, and the first entry is a dotfile. Next is only called when iterating to the next element, rewind is triggered to reset the iterator to the first element.
I triggered this bug on a php 5.4.11 system.
The fix is simple, skip the dot files either on next or on rewind calls.