Optimize autobrush mask generation by 15-20%
Just skip areas with n > 1. They are outsize the brush bounds, so
there is no reason to work with them.
And yes, it gives something like 15% better performance :)
(cherry picked from commit 282d2f0c60eb7adae6ae63fc5a83c311a809853f)