A last-second duck by Faf du Plessis saved him from hit being hit in the face by team-mates Quinton de Kock.