Effect of sheared flow on magnetic islands