Wiedemann-Franz law in the underdoped cuprate superconductor YBa2Cu3Oy