Test that indexOf() works for a long stream
Merge branch 'master' into invertstream
More changes to try to fix index problems