Only detect dirty regions with a Cursor inside.
Fix up dirty detection.