Mercedes' Lewis Hamilton narrowly avoids careering in to the back of Canadian GP race leader Sebastian Vettel after the Ferrari driver rejoined the track having gone wide.