Fixes #1846: IOException “Resetting to invalid mark” is no longer thrown.