fix invalid read while checking if an object is paged