I would also be interested to know why this happens, but I assume that this is due to the fact that it Sourceis an object (i.e. a singleton) and how it becomes transparent reset. You can fix the problem as follows:
for (l <- g.listFiles if !l.isDirectory) {
| val src = Source.fromFile(l)
| println( (0 /: src.getLines) { (i, line) => i + 1 } )
| src.reset
| }
reset, , , try-finally ( isDirectory, , )