I had the right-and-middle-click-when-pressing-side-buttons problem too and found a workaround. It seems like what happened was my xorg.conf said I had a 3 button mouse. Now, when I pressed the thumb buttons, it detected that they were pressed, but it thought it didn't have any buttons above 3! So, it just mapped them to 2 and 3 instead. The solution was to change the line
toCode:Option "Buttons" "3"
Now, if I turn off btnx and look in xev, when pressing the buttons they come up as 8 and 9, which aren't mapped to anything in X by default. Turning btnx back on, they work perfectly!Code:Option "Buttons" "12"