Fixed hitTest for masks from shapes.