Does two main changes:
- Handle regions in the order as visible on screen. Practically this just means handling overlapping regions before non-overlapping ones.
- Don't handle any other regions after having found one containing the mouse pointer.
Like T92364 suggests, this patch changes the clickable area from this:
To almost exactly this:
The Move Orientation: labels on the left of the 3D View tool header can still be clicked through in this patch, otherwise it seems to match.

