Turns out that 'winfo id' returns the id as a hex string, with 0x prefix.
The int() function (aliased to getint()) doesn't handle that, so we must
use self.tk.getint() again...
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index a508d26..d7e73cf 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -332,7 +332,7 @@
 		return getint(
 			self.tk.call('winfo', 'height', self._w))
 	def winfo_id(self):
-		return getint(
+		return self.tk.getint(
 			self.tk.call('winfo', 'id', self._w))
 	def winfo_interps(self, displayof=0):
 		args = ('winfo', 'interps') + self._displayof(displayof)