Portugal's Joao Almeida ensured he will wear the pink jersey for a 14th consecutive day after defending his overall race lead on Tuesday on the Giro d'Italia's 16th stage won by Slovenian Jan Tratnik.
"Sometimes the best defence is to attack," said the Deceuninck-Quick-Step rider.
Kelderman's Australian teammate Jai Hindley, third overall, is nearly three minutes adrift, having finished first among the pursuing group which including two-time race winner Vincenzo Nibali of Italy.
O'Connor fought back on the final climb of three up Monte di Ragogna, with 13km to go, with Tratnik letting the Australian lead in the final kilometre before pulling clear for the line.
It was his ninth career win and second WorldTour victory after the prologue of the Tour de Romandie last year.
"Gaviria went straight into isolation after the test result. He feels fine and is completely asymptomatic," his UAE Emirates team announced.
Monday's total of two positives was down on the first round of testing, when the virus was detected in riders Steven Kruijswijk and Michael Matthews along with six team personnel.
1. Joao Almeida (POR/DEC) 65hr 45min 08sec, 2. Wilco Kelderman (NED/SUN) at 17sec, 3. Jai Hindley (AUS/SUN) 2:58, 4. Tao Geoghegan Hart (GBR/INE) 2:59, 5. Pello Bilbao (ESP/BAH) 3:12, 6. Rafal Majka (POL/BOR) 3:20, 7. Vincenzo Nibali (ITA/TRE) 3:31, 8. Domenico Pozzovivo (ITA/NTT) 3:52, 9. Patrick Konrad (AUT/BOR) 4:11, 10. Fausto Masnada (ITA/DEC) 4:24, 11. Brandon McNulty (USA/UAE) 4:31, 12. Jakob Fuglsang (DEN/AST) 5:09.