Fix read offset check for inmemory driver

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Merge pull request #787 from ahmetalpbalkan/next-generation

NG: Fix read offset check for inmemory driver