Effect of local E×B flow shear on the stability of magnetic islands in tokamak plasmas