XI2 protocol raw events do not provide a sourceid, the libXi header however does. This value is always 0.
This is likely caused by a copy/paste bug and sourceid shouldn't be in the interface here. However, Xlib is set in stone and we can't remove it, so maybe adding it to the server is the best idea.
xserver support added in XI 2.1 (server version 1.12)
libXi commit 2ac185d2fd2b884f4f59a7f7f61f414d139859aa