Seems like I found out which flags causes trouble with the scrollbars and the mouse's scrollwheel: building wine without -fomit-frame-pointer flag makes it work right.
Using this switch is almost always a bad idea, as it makes getting backtraces impossible. OK, without debug symbols, they are of only limited usefulness but I've still been able to track down problems before using a stripped backtrace.
-fomit-frame-pointer is one of those "optimizations" that does more harm than good in my opinion.
If you are right and this is causing misbuilds, perhaps we should have a check in the configure script for over-agressive optimization. Alexandre?