Rory McIlroy turned a potential birdie opportunity into an untimely double-bogey after a careless mistake during the second round of the Hero World Challenge.