Fix race where _ended can flop from true to false
Fix sort order in extract test

Was previously relying on an (outdated) case-insensitive sort.
Bump fstream dep

Now all tests pass