Rory McIlroy almost pulled off an almighty resurgence at the Genesis Invitational before finishing T2 thanks to a late birdie.