Fix extent computation in memory provider