md: Don't read past end of bitmap when reading bitmap.