more robust write mask granularity detection