Behaviour
When iterating over a directory with lfs_dir_open and lfs_dir_read in a loop, if after calling lfs_dir_read on the last file, one calls lfs_dir_tell, the call success. However, calling lfs_dir_seek with the given value fails with -22 (invalid).
Expected behaviour
I'd expect this to succeed and only further calls to lfs_dir_read to fail. It would also be reasonable to have lfs_dir_tell fail too with a NOENT error..
Reproducer
The test_dirs doesn't iterate over all the files created in the directory, so this bug doesn't happen in the test suite. See #786  for an updated test suite that triggers the bug.