There were times when it looked as if it were Rory McIlroy who had received a bang on his head so erratic was his play.