Adding assertions for better error reporting, to InputStreamByteAccess.