Impact of a shear flow on double tearing nonlinear dynamics