The X driver does not reliably switch between tools with non-protocol-5 devices. For example, after switching from the stylus to the eraser, events will continue to come from the former. If you bring the eraser out of prox and then back in, the events will begin coming from the eraser as expected.
The problem was introduced during the patch set cleaning up device ID handling (beginning with commit 840e658). The new code is conservative about updating the channel's ds->device_type but does not clear the value when the pen enters/leaves prox (except for protocol 5) leading to this problem.
This has been addressed in commit 44a290e.